|
|
@ -59,6 +59,7 @@ import com.epmet.modules.invitation.service.InvitationRecordService; |
|
|
|
import com.epmet.modules.member.service.ResiGroupMemberService; |
|
|
|
import com.epmet.resi.group.dto.act.GroupActIdDTO; |
|
|
|
import com.epmet.resi.group.dto.act.GroupActInfoDTO; |
|
|
|
import com.epmet.resi.group.dto.act.LineChartDTO; |
|
|
|
import com.epmet.resi.group.dto.act.OrganizationalLifeLineChartDTO; |
|
|
|
import com.epmet.resi.group.dto.act.form.*; |
|
|
|
import com.epmet.resi.group.dto.act.result.ActDetailByLinkResultDTO; |
|
|
@ -886,7 +887,7 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl<GroupActInfoDao, Gr |
|
|
|
* @author zxc |
|
|
|
* @date 2021/9/3 2:57 下午 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
/*@Override |
|
|
|
public OrganizationalLifeResultDTO organizationalLife(OrganizationalLifeFormDTO formDTO) { |
|
|
|
OrganizationalLifeResultDTO result = new OrganizationalLifeResultDTO(); |
|
|
|
if (StringUtils.isBlank(formDTO.getYearId())){ |
|
|
@ -939,6 +940,47 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl<GroupActInfoDao, Gr |
|
|
|
} |
|
|
|
result.setLineChart(lineChart); |
|
|
|
return result; |
|
|
|
}*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
public OrganizationalLifeResultDTO organizationalLife(OrganizationalLifeFormDTO formDTO) { |
|
|
|
OrganizationalLifeResultDTO result = new OrganizationalLifeResultDTO(); |
|
|
|
if (StringUtils.isBlank(formDTO.getYearId())) { |
|
|
|
formDTO.setYearId(String.valueOf(LocalDate.now().getYear())); |
|
|
|
} |
|
|
|
List<LineChartDTO> myActs = baseDao.selectMyCreateActTypeMonth(formDTO.getUserId(), formDTO.getYearId()); |
|
|
|
List<LineChartDTO> joinActs = baseDao.selectShouldJoinActTypeMonth(formDTO.getUserId(), formDTO.getYearId()); |
|
|
|
List<LineChartDTO> signInActs = baseDao.selectSignInTypeMonth(formDTO.getUserId(), formDTO.getYearId()); |
|
|
|
// 折线图组装
|
|
|
|
List<OrganizationalLifeLineChartDTO> lineChart = lineChart(formDTO.getYearId()); |
|
|
|
lineChart.forEach(l ->{ |
|
|
|
if (!CollectionUtils.isEmpty(myActs)){ |
|
|
|
myActs.forEach(m -> { |
|
|
|
if (l.getMonth().equals(m.getMonth())){ |
|
|
|
l.setOrganizationalActCount(m.getValue()); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
if (!CollectionUtils.isEmpty(joinActs)){ |
|
|
|
joinActs.forEach(j -> { |
|
|
|
if (l.getMonth().equals(j.getMonth())){ |
|
|
|
l.setShouldJoinActCount(j.getValue()); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
if (!CollectionUtils.isEmpty(signInActs)){ |
|
|
|
signInActs.forEach(s -> { |
|
|
|
if (l.getMonth().equals(s.getMonth())){ |
|
|
|
l.setActSignCount(s.getValue()); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
result.setOrganizationalActCount(CollectionUtils.isEmpty(myActs) ? NumConstant.ZERO : myActs.stream().collect(Collectors.summingInt(LineChartDTO::getValue))); |
|
|
|
result.setShouldJoinActCount(CollectionUtils.isEmpty(joinActs) ? NumConstant.ZERO : joinActs.stream().collect(Collectors.summingInt(LineChartDTO::getValue))); |
|
|
|
result.setActSignCount(CollectionUtils.isEmpty(signInActs) ? NumConstant.ZERO : signInActs.stream().collect(Collectors.summingInt(LineChartDTO::getValue))); |
|
|
|
result.setLineChart(lineChart); |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|