|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public Integer addGroupUnit(IrGroupUnit po) { | 
|---|
|  |  |  | po.setOperateDt(new Date()); | 
|---|
|  |  |  | po.setDeleted((byte) 0); | 
|---|
|  |  |  | int rows = irGroupUnitMapper.insertSelective(po); | 
|---|
|  |  |  | if (rows == 0) { | 
|---|
|  |  |  | return 0; | 
|---|
|  |  |  | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public Integer deleteGroupUnit(IrGroupUnit po) { | 
|---|
|  |  |  | po.setOperateDt(new Date()); | 
|---|
|  |  |  | int rows = irGroupUnitMapper.deleteByUnitIdGroupId(po); | 
|---|
|  |  |  | if (rows == 0) { | 
|---|
|  |  |  | return 0; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return 1; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 查一个轮灌组绑定的灌溉单元id | 
|---|
|  |  |  | * @param groupId | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public List<Long> getGroupBindUnits(Long groupId) { | 
|---|
|  |  |  | List<Long> groupBindUnits = irGroupUnitMapper.getGroupBindUnits(groupId); | 
|---|
|  |  |  | return groupBindUnits; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | *     //查未绑定轮灌组的灌溉单元id | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public List<Long> getNotBindUnits() { | 
|---|
|  |  |  | List<Long> notBindUnits = irGroupUnitMapper.getNotBindUnits(); | 
|---|
|  |  |  | return notBindUnits; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|