| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.zzg.common.core.domain.entity.state.*; |
| | | import com.zzg.common.core.domain.entity.state.StateAgreement; |
| | | import com.zzg.common.core.domain.entity.state.StateAsset; |
| | | import com.zzg.common.core.domain.entity.state.StateHousehold; |
| | | import com.zzg.common.core.domain.entity.state.StateHouseholdOwner; |
| | | import com.zzg.common.core.domain.entity.state.StateProject; |
| | | import com.zzg.common.core.domain.entity.state.StateProjectInfo; |
| | | import com.zzg.common.core.domain.entity.state.StateSettlement; |
| | | import com.zzg.common.core.domain.entity.system.SysDictData; |
| | | import com.zzg.common.enums.*; |
| | | import com.zzg.common.enums.AgreementTypeEnum; |
| | | import com.zzg.common.enums.CompensationCategoryEnum; |
| | | import com.zzg.common.enums.DeleteFlagEnum; |
| | | import com.zzg.common.enums.StateProjectStatusEnum; |
| | | import com.zzg.common.enums.SubmitStatusEnum; |
| | | import com.zzg.common.utils.DateUtil; |
| | | import com.zzg.common.utils.DateUtils; |
| | | import com.zzg.common.utils.PageUtils; |
| | |
| | | import com.zzg.system.convert.StateProjectConvert; |
| | | import com.zzg.system.domain.bo.PlacementStatisticsBO; |
| | | import com.zzg.system.domain.bo.ProjectStatisticsBO; |
| | | import com.zzg.system.domain.vo.*; |
| | | import com.zzg.system.domain.vo.AssetGraphVO; |
| | | import com.zzg.system.domain.vo.AssetMoneyVO; |
| | | import com.zzg.system.domain.vo.HouseholdVO; |
| | | import com.zzg.system.domain.vo.PlacementStatisticsVO; |
| | | import com.zzg.system.domain.vo.PlacementStreetAreaVO; |
| | | import com.zzg.system.domain.vo.PlacementStreetMoneyVO; |
| | | import com.zzg.system.domain.vo.PlacementStreetVO; |
| | | import com.zzg.system.domain.vo.ProjectAnalysisSumVO; |
| | | import com.zzg.system.domain.vo.ProjectDataCenterStreetVO; |
| | | import com.zzg.system.domain.vo.ProjectDataCenterTypeVO; |
| | | import com.zzg.system.domain.vo.ProjectExecutionSumVO; |
| | | import com.zzg.system.domain.vo.ProjectStatusExpiredVO; |
| | | import com.zzg.system.domain.vo.TransitionPageVO; |
| | | import com.zzg.system.mapper.state.StateAssetMapper; |
| | | import com.zzg.system.service.state.*; |
| | | import com.zzg.system.service.state.StateAgreementService; |
| | | import com.zzg.system.service.state.StateDateCenterService; |
| | | import com.zzg.system.service.state.StateHouseholdOwnerService; |
| | | import com.zzg.system.service.state.StateHouseholdService; |
| | | import com.zzg.system.service.state.StateProjectInfoService; |
| | | import com.zzg.system.service.state.StateProjectService; |
| | | import com.zzg.system.service.state.StateSettlementService; |
| | | import com.zzg.system.service.system.ISysDictTypeService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.sql.Timestamp; |
| | | import java.time.Year; |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | @Resource |
| | | @Lazy |
| | | private final ISysDictTypeService dictTypeService; |
| | | |
| | | @Resource |
| | | @Lazy |
| | | private final StateAgreementService stateAgreementService; |
| | | |
| | | @Resource |
| | | @Lazy |
| | | private final StateApplyRecordItemService stateApplyRecordItemService; |
| | | |
| | | @Resource |
| | | @Lazy |
| | | private final StateApplyRecordService stateApplyRecordService; |
| | | |
| | | |
| | | //计算最上面顶部统计数据 |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 项目统计-模拟征收超期项目 |
| | | * @param projectStatisticsBO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageInfo<ProjectStatusExpiredVO> expiredProjectStatus(ProjectStatisticsBO projectStatisticsBO) { |
| | | |
| | |
| | | return pageInfo; |
| | | } |
| | | |
| | | /** |
| | | * 获取数据中心安置情况模块 中间的饼图 |
| | | * @param projectStreet |
| | | * @param projectStartTime |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PlacementStatisticsVO placementStatistics(String projectStreet, Date projectStartTime, Integer type) { |
| | | |
| | |
| | | |
| | | // 遍历内层的 Map(按项目阶段分类) |
| | | for (ProjectExecutionSumVO executionSum : projectExecutionMap.values()) { |
| | | // // 累加签字人数 |
| | | // totalSignedPersons += executionSum.getSignedPersons() != null ? executionSum.getSignedPersons() : 0L; |
| | | // |
| | | // // 累加未签字人数 |
| | | // totalNotSignedPersons += executionSum.getNotSignedPersons() != null ? executionSum.getNotSignedPersons() : 0L; |
| | | |
| | | // // 累加货币补偿人数 |
| | | // totalMoneyCompensationPersons += executionSum.getMoneyCompensationPersons() != null ? executionSum.getMoneyCompensationPersons() : 0L; |
| | | // |
| | | // // 累加房屋置换人数 |
| | | // totalGoodsCompensationPersons += executionSum.getGoodsCompensationPersons() != null ? executionSum.getGoodsCompensationPersons() : 0L; |
| | | |
| | | // 累加项目预算金额 |
| | | totalVirtualMoney.add(executionSum.getVirtualMoney() != null ? executionSum.getVirtualMoney() : new BigDecimal("0")); |
| | | } |
| | |
| | | return stateProjectService.list(queryWrapper); |
| | | } |
| | | |
| | | /** |
| | | * 获取数据中心安置情况模块 下方的分页查询 |
| | | * @param placementStatisticsBO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageInfo<TransitionPageVO> placementStatisticsPage(PlacementStatisticsBO placementStatisticsBO) { |
| | | |
| | |
| | | return transitionPageVOPageInfo; |
| | | } |
| | | |
| | | /** |
| | | * 项目资金 数据中心-项目资产统计 左侧数据 |
| | | * @param stateTime |
| | | * @return |
| | | */ |
| | | @Override |
| | | public AssetMoneyVO sumAssetMoney(Date stateTime) { |
| | | |
| | |
| | | double settlementMoney = 0; |
| | | |
| | | if (CollectionUtils.isNotEmpty(stateHouseholdList)) { |
| | | |
| | | List<String> stateHouseholdIds = stateHouseholdList.stream().map(StateHousehold::getId).collect(Collectors.toList()); |
| | | |
| | | //合同金额 |
| | | LambdaQueryWrapper<StateAgreement> stateAgreementLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | stateAgreementLambdaQueryWrapper.in(StateAgreement::getStateHouseholdId, stateHouseholdIds); |
| | |
| | | if (CollectionUtils.isNotEmpty(stateAgreementList)) { |
| | | agreementMoney = stateAgreementList.stream().mapToDouble(StateAgreement::getMoney).sum(); |
| | | } |
| | | |
| | | |
| | | //产全置换合同金额 |
| | | double cqzhagreementMoney = 0; |
| | |
| | | //结算金额=货币补偿+产权置换价值差 |
| | | settlementMoney = settlementMoney + cqxhMoney; |
| | | } |
| | | |
| | | } |
| | | |
| | | result.setAgreementMoney(BigDecimal.valueOf(agreementMoney).setScale(4, RoundingMode.HALF_UP)); |
| | | result.setSettlementMoney(BigDecimal.valueOf(settlementMoney).setScale(4, RoundingMode.HALF_UP)); |
| | | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 数据中心-项目资产统计 右侧柱状图 |
| | | * @param stateTime |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<AssetGraphVO> listAssetGraph(Date stateTime) { |
| | | LambdaQueryWrapper<StateProject> projectLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | |
| | | if (CollectionUtils.isEmpty(list)) { |
| | | return new ArrayList<>(); |
| | | } |
| | | |
| | | List<String> streetList = new ArrayList<>(); |
| | | |
| | | List<String> projectIdList = list.stream().map(StateProject::getId).collect(Collectors.toList()); |
| | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 数据中心-安置情况柱状图 |
| | | * @param street |
| | | * @param stateTime |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PlacementStreetVO sumPlacementStreet(String street, Date stateTime) { |
| | | String houseStreet = street; |
| | |
| | | } |
| | | |
| | | //设置置换前面积 现在有项目所有信息 需要通过项目获取关联的房产信息总和 |
| | | |
| | | |
| | | private Map<String, Integer> appendProcessStatusMap(List<StateProject> stateProjectList) { |
| | | Map<String, Integer> result = new HashMap<>(); |
| | | if (CollectionUtils.isEmpty(stateProjectList)) { |