forked from integrated_whb/integrated_whb
电子围栏树结构适配
parent
8c70ca1a79
commit
e358657730
|
@ -25,6 +25,7 @@ public interface ElectronicFenceMapper {
|
||||||
List<PageData> listAll(PageData pd);
|
List<PageData> listAll(PageData pd);
|
||||||
|
|
||||||
List<Map<String, Object>> listTree(PageData pd);
|
List<Map<String, Object>> listTree(PageData pd);
|
||||||
|
List<Map<String, Object>> listTreeApp(PageData pd);
|
||||||
|
|
||||||
List<PageData> findByPId(PageData pd);
|
List<PageData> findByPId(PageData pd);
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,11 @@ public class ElectronicFenceServiceImpl implements ElectronicFenceService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, Object>> listTree(PageData pd) {
|
public List<Map<String, Object>> listTree(PageData pd) {
|
||||||
|
if ("children".equals(pd.getString("childKey"))) {
|
||||||
|
// 手机端
|
||||||
|
List<Map<String, Object>> dataList = electronicFenceMapper.listTreeApp(pd);
|
||||||
|
return buildTree(dataList, pd.getString("childKey"));
|
||||||
|
}
|
||||||
List<Map<String, Object>> dataList = electronicFenceMapper.listTree(pd);
|
List<Map<String, Object>> dataList = electronicFenceMapper.listTree(pd);
|
||||||
return buildTree(dataList, pd.getString("childKey"));
|
return buildTree(dataList, pd.getString("childKey"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,6 +177,16 @@
|
||||||
f
|
f
|
||||||
where f.ISDELETE = '0' and f.CORPINFO_ID = #{CORPINFO_ID} and f.PARENT_ID = #{ELECTRONIC_FENCE_AREA_ID}
|
where f.ISDELETE = '0' and f.CORPINFO_ID = #{CORPINFO_ID} and f.PARENT_ID = #{ELECTRONIC_FENCE_AREA_ID}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="listTreeApp" resultType="java.util.Map">
|
||||||
|
SELECT
|
||||||
|
IFNULL(ELECTRONIC_FENCE_ID,ELECTRONIC_FENCE_AREA_ID) id,
|
||||||
|
ELECTRONIC_FENCE_AREA_NAME name,
|
||||||
|
PARENT_ID pId
|
||||||
|
FROM
|
||||||
|
electronic_fence f
|
||||||
|
WHERE
|
||||||
|
f.ISDELETE = '0' and f.CORPINFO_ID = #{CORPINFO_ID}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<!-- 批量删除 -->
|
<!-- 批量删除 -->
|
||||||
|
|
Loading…
Reference in New Issue