Merge remote-tracking branch 'origin/test' into test
| | |
| | | private Integer unitTotal; |
| | | |
| | | @ApiModelProperty("楼层数") |
| | | private Integer buildFloorSum; |
| | | private String buildFloorSum; |
| | | |
| | | @ApiModelProperty("总户数") |
| | | private Integer houseNum; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | comMngVillageVO.setCommunityId(communityId); |
| | | if(StringUtils.isEmpty(comMngVillageVO.getGroupAt())){ |
| | | comMngVillageVO.setName(comMngVillageVO.getAlley() + comMngVillageVO.getHouseNum()); |
| | | }else{ |
| | | comMngVillageVO.setName(comMngVillageVO.getGroupAt()); |
| | | } |
| | | return communityService.addVillage(comMngVillageVO); |
| | | } |
| | | |
| | |
| | | public R pageBuildingAdmin(PageBuildingListDto pageBuildingListDto){ |
| | | IPage<PageBuildingListAdminVo> pageBuildingList = this.baseMapper.pageBuildingAdmin( |
| | | new Page(pageBuildingListDto.getPageNum(),pageBuildingListDto.getPageSize()),pageBuildingListDto); |
| | | pageBuildingList.getRecords().forEach(building -> { |
| | | //查询该楼栋下最高的楼层 |
| | | if(StringUtils.isNotEmpty(building.getBuildFloorSum())){ |
| | | if(building.getBuildFloorSum().length() == 3){ |
| | | building.setBuildFloorSum(building.getBuildFloorSum().substring(0,1)); |
| | | }else if(building.getBuildFloorSum().length() == 4){ |
| | | building.setBuildFloorSum(building.getBuildFloorSum().substring(0,2)); |
| | | }else if(building.getBuildFloorSum().length() > 4){ |
| | | building.setBuildFloorSum(building.getBuildFloorSum().substring(0,2)); |
| | | } |
| | | } |
| | | }); |
| | | return R.ok(pageBuildingList); |
| | | } |
| | | |
| | |
| | | cascadeHouseVOList = this.baseMapper.getHouseLevelByAlley(cascadeHouseDTO.getCommunityId(), |
| | | cascadeHouseDTO.getVillageId()); |
| | | cascadeHouseVOList = cascadeHouseVOList.stream() |
| | | .collect(Collectors.collectingAndThen( |
| | | Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(o -> o.getAlley()))), |
| | | ArrayList::new)); |
| | | .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>( |
| | | Comparator.comparing(ComMngCascadeHouseVO::getAlley))),ArrayList::new)); |
| | | cascadeHouseVOList.forEach(cascade -> { |
| | | cascade.setName(cascade.getAlley()); |
| | | }); |
| | |
| | | cmv.`name` AS villageName, |
| | | cmv.house_num as doorNum, |
| | | (select count(distinct unit_no) from com_mng_population_house where village_id = cmb.village_id AND floor = cmb.`name`) as unit_total, |
| | | cmb.build_floor_sum, |
| | | (select max(CAST(house_no as SIGNED)) from com_mng_population_house where village_id = cmb.village_id AND floor = cmb.`name`) as buildFloorSum, |
| | | (select count(id) from com_mng_population_house where village_id = cmb.village_id and floor = cmb.`name`) as houseNum, |
| | | (select count(id) from com_mng_population where village_id = cmb.village_id and floor = cmb.`name`) as populationNum |
| | | FROM |