Browse Source

根据gridId查询pids

dev_shibei_match
zxc 4 years ago
parent
commit
61a87b08f7
  1. 9
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
  2. 5
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java
  3. 11
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java
  4. 8
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java
  5. 8
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java
  6. 14
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
  7. 5
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml

9
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java

@ -352,4 +352,13 @@ public interface GovOrgOpenFeignClient {
**/
@GetMapping(value = "/gov/org/customeragency/getareacodeswitch/{customerId}")
Result<String> getAreaCodeSwitch(@PathVariable("customerId")String customerId);
/**
* @Description 根据网格ID查询pids
* @Param gridId
* @author zxc
* @date 2021/7/16 9:52 上午
*/
@PostMapping(value = "/gov/org/customergrid/pidsbygrid")
Result<String> selectPidsByGridId(@RequestParam("gridId") String gridId);
}

5
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java

@ -209,4 +209,9 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient {
public Result<String> getAreaCodeSwitch(String customerId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getAreaCodeSwitch", customerId);
}
@Override
public Result<String> selectPidsByGridId(String gridId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "selectPidsByGridId", gridId);
}
}

11
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java

@ -241,4 +241,15 @@ public class CustomerGridController {
List<String> resultDTOS = customerGridService.listGridIdsInCommunity(gridId);
return new Result<List<String>>().ok(resultDTOS);
}
/**
* @Description 根据网格ID查询pids
* @Param gridId
* @author zxc
* @date 2021/7/16 9:52 上午
*/
@PostMapping("pidsbygrid")
public Result<String> selectPidsByGridId(@RequestParam("gridId") String gridId){
return new Result<String>().ok(customerGridService.selectPidsByGridId(gridId));
}
}

8
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java

@ -268,4 +268,12 @@ public interface CustomerGridDao extends BaseDao<CustomerGridEntity> {
* @date 2021/4/19 11:56 上午
*/
CustomerGridDTO getGridBaseInfoById(@Param("gridId") String gridId);
/**
* @Description 根据网格ID查询pids
* @Param gridId
* @author zxc
* @date 2021/7/16 9:52 上午
*/
String selectPidsByGridId(@Param("gridId")String gridId);
}

8
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java

@ -287,4 +287,12 @@ public interface CustomerGridService extends BaseService<CustomerGridEntity> {
* @date 2021/4/19 11:53 上午
*/
Result<CustomerGridDTO> getBaseInfo(CustomerGridFormDTO customerGridFormDTO);
/**
* @Description 根据网格ID查询pids
* @Param gridId
* @author zxc
* @date 2021/7/16 9:52 上午
*/
String selectPidsByGridId(String gridId);
}

14
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java

@ -707,4 +707,18 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
public Result<CustomerGridDTO> getBaseInfo(CustomerGridFormDTO customerGridFormDTO) {
return new Result<CustomerGridDTO>().ok(ConvertUtils.sourceToTarget(baseDao.selectById(customerGridFormDTO.getGridId()), CustomerGridDTO.class));
}
/**
* @Description 根据网格ID查询pids
* @Param gridId
* @author zxc
* @date 2021/7/16 9:52 上午
*/
@Override
public String selectPidsByGridId(String gridId) {
if (StringUtils.isNotBlank(gridId)){
return baseDao.selectPidsByGridId(gridId);
}
return "";
}
}

5
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml

@ -576,4 +576,9 @@
cg.ID = #{gridId}
AND cg.DEL_FLAG = '0'
</select>
<!-- 根据网格ID查询pids -->
<select id="selectPidsByGridId" resultType="java.lang.String">
SELECT PIDS FROM customer_grid WHERE DEL_FLAG = '0' AND ID = #{gridId}
</select>
</mapper>

Loading…
Cancel
Save