| | |
| | | package com.dy.pipIrrProject.divide; |
| | | |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.daoBa.BaDistrictMapper; |
| | | import com.dy.pipIrrGlobal.daoPr.PrDivideMapper; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrDivide; |
| | | import com.dy.pipIrrGlobal.voPr.VoDivide; |
| | |
| | | public class DivideSv { |
| | | @Autowired |
| | | private PrDivideMapper prDivideMapper; |
| | | |
| | | @Autowired |
| | | private BaDistrictMapper baDistrictMapper; |
| | | |
| | | /** |
| | | * 添加分水房 |
| | |
| | | rsVo = prDivideMapper.getDivides(params); |
| | | return rsVo ; |
| | | } |
| | | |
| | | /** |
| | | * 根据分水房主键获取分水房对象 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public PrDivide getOneDivide(Long id) { |
| | | return prDivideMapper.selectByPrimaryKey(id); |
| | | } |
| | | |
| | | /** |
| | | * 根据主键逻辑删除一个分水房 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public Integer deleteDivideById(Long id) { |
| | | return prDivideMapper.deleteDivideById(id); |
| | | } |
| | | |
| | | /** |
| | | * 根据村编号获取5级区划信息 |
| | | * @param villageId 村编号(主键) |
| | | * @return 5级行政区划信息 |
| | | */ |
| | | public Map getDistrictsByVillageId(Long villageId) { |
| | | return baDistrictMapper.getDistrictsByVillageId(villageId); |
| | | } |
| | | |
| | | /** |
| | | * 修改分水房对象 |
| | | * @param po 农户对象 |
| | | * @return 修改记录条数 |
| | | */ |
| | | public Integer updateByPrimaryKey(PrDivide po) { |
| | | return prDivideMapper.updateByPrimaryKey(po); |
| | | } |
| | | } |