新增网格方法
This commit is contained in:
parent
3ddf96bd4c
commit
0d74fd1c71
@ -74,6 +74,24 @@ public interface IGridService {
|
|||||||
*/
|
*/
|
||||||
List<GridRelationDTO> listGridRelationByRelationIds(List<String> relationIds) throws SearchException;
|
List<GridRelationDTO> listGridRelationByRelationIds(List<String> relationIds) throws SearchException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取网格关系列表
|
||||||
|
*
|
||||||
|
* @param gridId 网格ID
|
||||||
|
* @return
|
||||||
|
* @throws SearchException
|
||||||
|
*/
|
||||||
|
List<GridRelationDTO> listGridRelationByGridId(String gridId) throws SearchException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取网格关系列表
|
||||||
|
*
|
||||||
|
* @param gridIds 网格ID列表
|
||||||
|
* @return
|
||||||
|
* @throws SearchException
|
||||||
|
*/
|
||||||
|
List<GridRelationDTO> listGridRelationByGridIds(List<String> gridIds) throws SearchException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取网格列表
|
* 获取网格列表
|
||||||
*
|
*
|
||||||
|
@ -60,7 +60,7 @@ public class GridServiceImpl extends AbstractService implements IGridService {
|
|||||||
params.put("gridId", gridId);
|
params.put("gridId", gridId);
|
||||||
gridDao.deleteGridPoint(params);
|
gridDao.deleteGridPoint(params);
|
||||||
// 新增网格数组
|
// 新增网格数组
|
||||||
for(GridPointVO gridPointVO : pointArray) {
|
for (GridPointVO gridPointVO : pointArray) {
|
||||||
params = HashMapUtil.beanToMap(gridPointVO);
|
params = HashMapUtil.beanToMap(gridPointVO);
|
||||||
params.put("gridId", gridId);
|
params.put("gridId", gridId);
|
||||||
gridDao.saveGridPoint(params);
|
gridDao.saveGridPoint(params);
|
||||||
@ -91,7 +91,7 @@ public class GridServiceImpl extends AbstractService implements IGridService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteGridByGridIds(List<String> gridIds) throws RemoveException {
|
public void deleteGridByGridIds(List<String> gridIds) throws RemoveException {
|
||||||
if(gridIds.isEmpty()) {
|
if (gridIds.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 删除网格
|
// 删除网格
|
||||||
@ -118,6 +118,20 @@ public class GridServiceImpl extends AbstractService implements IGridService {
|
|||||||
return gridDao.listGridRelation(params);
|
return gridDao.listGridRelation(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<GridRelationDTO> listGridRelationByGridId(String gridId) throws SearchException {
|
||||||
|
Map<String, Object> params = getHashMap(2);
|
||||||
|
params.put("gridId", gridId);
|
||||||
|
return gridDao.listGridRelation(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<GridRelationDTO> listGridRelationByGridIds(List<String> gridIds) throws SearchException {
|
||||||
|
Map<String, Object> params = getHashMap(2);
|
||||||
|
params.put("gridIds", gridIds);
|
||||||
|
return gridDao.listGridRelation(params);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<GridDTO> listGridByRelationId(String relationId) throws SearchException {
|
public List<GridDTO> listGridByRelationId(String relationId) throws SearchException {
|
||||||
List<GridDTO> gridDTOs = gridDao.listGridByRelationId(relationId);
|
List<GridDTO> gridDTOs = gridDao.listGridByRelationId(relationId);
|
||||||
|
@ -138,6 +138,17 @@
|
|||||||
#{relationIds[${index}]}
|
#{relationIds[${index}]}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="gridId != null and gridId != ''">
|
||||||
|
AND
|
||||||
|
grid_id = #{gridId}
|
||||||
|
</if>
|
||||||
|
<if test="gridIds != null and gridIds.size > 0">
|
||||||
|
AND
|
||||||
|
grid_id IN
|
||||||
|
<foreach collection="gridIds" index="index" open="(" separator="," close=")">
|
||||||
|
#{gridIds[${index}]}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 获取网格列表(通过关联ID) -->
|
<!-- 获取网格列表(通过关联ID) -->
|
||||||
|
Loading…
Reference in New Issue
Block a user