Browse Source
# Conflicts: # epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java # epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingService.java # epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java # epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingServiceImpl.javamaster
22 changed files with 543 additions and 32 deletions
@ -0,0 +1,23 @@ |
|||||
|
package com.epmet.dto.form.lingshan; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.QueryGroup; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* @Description 灵山大屏,根据网格id,查询党员中心户房屋坐标 |
||||
|
* @Author yzm |
||||
|
* @Date 2023/5/18 10:14 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ScreenPartyCenterHouseDistributionFormDTO { |
||||
|
/** |
||||
|
* 网格必填 |
||||
|
*/ |
||||
|
@NotBlank(message = "gridId不能为空",groups = QueryGroup.class) |
||||
|
private String gridId; |
||||
|
private String neighborHoodId; |
||||
|
private String buildingId; |
||||
|
} |
||||
|
|
@ -0,0 +1,18 @@ |
|||||
|
package com.epmet.dto.result.lingshan; |
||||
|
|
||||
|
import com.epmet.dto.IcHouseDTO; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author yzm |
||||
|
* @Date 2023/5/18 14:05 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class HouseDetailResultDTO extends IcHouseDTO { |
||||
|
/** |
||||
|
* 如果是党员中心户,关联的联户数 |
||||
|
*/ |
||||
|
private Integer totalLianHu; |
||||
|
} |
||||
|
|
@ -0,0 +1,43 @@ |
|||||
|
package com.epmet.dto.result.lingshan; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author yzm |
||||
|
* @Date 2023/5/18 10:56 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ScreenPartyCenterHouseDistributionResDTO { |
||||
|
/** |
||||
|
* 小区id |
||||
|
*/ |
||||
|
private String neighborHoodId; |
||||
|
private String neighborHoodName; |
||||
|
/** |
||||
|
* 所属楼栋id |
||||
|
*/ |
||||
|
private String buildingId; |
||||
|
private String buildingName; |
||||
|
/** |
||||
|
* 所属单元id |
||||
|
*/ |
||||
|
private String buildingUnitId; |
||||
|
private String unitName; |
||||
|
|
||||
|
/** |
||||
|
* 房屋名字后台插入时生成 |
||||
|
*/ |
||||
|
private String houseName; |
||||
|
/** |
||||
|
* 房屋坐标 |
||||
|
*/ |
||||
|
private String longitude; |
||||
|
private String latitude; |
||||
|
|
||||
|
/** |
||||
|
* 灵山项目:是否党员中心户:1是;0不是 |
||||
|
*/ |
||||
|
private String partyCenterHouseFlag; |
||||
|
} |
||||
|
|
@ -0,0 +1,66 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.annotation.LoginUser; |
||||
|
import com.epmet.commons.tools.security.dto.TokenDto; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.dto.IcBuildingDTO; |
||||
|
import com.epmet.dto.IcHouseDTO; |
||||
|
import com.epmet.dto.form.lingshan.ScreenPartyCenterHouseDistributionFormDTO; |
||||
|
import com.epmet.dto.result.lingshan.HouseDetailResultDTO; |
||||
|
import com.epmet.service.IcBuildingService; |
||||
|
import com.epmet.service.IcHouseService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description 灵山大屏-查询gov-org库的接口, 可以放在这.... |
||||
|
* @Author yzm |
||||
|
* @Date 2023/5/18 10:05 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("houseScreen") |
||||
|
public class LingShanScreenGovOrgController { |
||||
|
@Autowired |
||||
|
private IcHouseService icHouseService; |
||||
|
@Autowired |
||||
|
private IcBuildingService icBuildingService; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 灵山大屏:查询楼栋坐标 |
||||
|
* |
||||
|
* @param tokenDto |
||||
|
* @param formDTO |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("building-distribution") |
||||
|
public Result<List<IcBuildingDTO>> buildingDistribution(@LoginUser TokenDto tokenDto, @RequestBody ScreenPartyCenterHouseDistributionFormDTO formDTO) { |
||||
|
return new Result<List<IcBuildingDTO>>().ok(icBuildingService.buildingDistribution(tokenDto.getCustomerId(), formDTO.getGridId(), formDTO.getNeighborHoodId())); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 灵山大屏:查询房屋坐标点位 |
||||
|
* 支持根据网格\小区\楼栋id查询 |
||||
|
*/ |
||||
|
@PostMapping("house-distribution") |
||||
|
public Result<List<IcHouseDTO>> houseDistribution(@LoginUser TokenDto tokenDto, @RequestBody ScreenPartyCenterHouseDistributionFormDTO formDTO) { |
||||
|
return new Result<List<IcHouseDTO>>().ok(icHouseService.houseDistribution(tokenDto.getCustomerId(), formDTO.getGridId(), formDTO.getNeighborHoodId(), formDTO.getBuildingId())); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 灵山大屏:点击房屋,显示房屋详情 |
||||
|
* @param houseId |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("houseDetail/{houseId}") |
||||
|
public Result<HouseDetailResultDTO> queryHouseDetail(@PathVariable("houseId")String houseId){ |
||||
|
return new Result<HouseDetailResultDTO>().ok(icHouseService.queryHouseDetail(houseId)); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,49 @@ |
|||||
|
package com.epmet.enums; |
||||
|
|
||||
|
public enum LingShanHelpCrowdTypeEnum { |
||||
|
// 人员类别。【canji残疾人,dabing大病,dibao低保,gaoling高龄老人,kongchao空巢老人,duju独居老人,liushou留守儿童, tekun特困人员】
|
||||
|
|
||||
|
CANJI("canji", "残疾", 1), |
||||
|
DABING("dabing", "大病", 2), |
||||
|
DIBAO("dibao", "低保", 3), |
||||
|
GAOLING("gaoling", "高龄老人", 4), |
||||
|
KONGCHAO("kongchao", "空巢老人", 5), |
||||
|
DUJU("duju", "独居老人", 6), |
||||
|
LIUSHOU("liushou", "留守儿童", 7), |
||||
|
TEKUN("tekun", "特困人员", 8); |
||||
|
|
||||
|
/** |
||||
|
* 类型。anzhibangjiao, |
||||
|
*/ |
||||
|
public final String type; |
||||
|
public final String name; |
||||
|
|
||||
|
private Integer headerRowNumber; |
||||
|
|
||||
|
LingShanHelpCrowdTypeEnum(String type, String name, Integer headerRowNumber) { |
||||
|
this.type = type; |
||||
|
this.name = name; |
||||
|
this.headerRowNumber = headerRowNumber; |
||||
|
} |
||||
|
|
||||
|
public String getType() { |
||||
|
return type; |
||||
|
} |
||||
|
|
||||
|
public String getName() { |
||||
|
return name; |
||||
|
} |
||||
|
|
||||
|
public Integer getHeaderRowNumber() { |
||||
|
return headerRowNumber; |
||||
|
} |
||||
|
|
||||
|
public static LingShanHelpCrowdTypeEnum getByType(String type) { |
||||
|
for (LingShanHelpCrowdTypeEnum e : LingShanHelpCrowdTypeEnum.values()) { |
||||
|
if (e.getType().equals(type)) { |
||||
|
return e; |
||||
|
} |
||||
|
} |
||||
|
return null; |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue