Commit a92b5c48 authored by luben's avatar luben

fix

parent b4d451b1
......@@ -105,6 +105,12 @@ public class GridRegion implements Serializable {
*/
private String wgCoordinate;
private String status;
public String getStatus(){return status;}
public void setStatus(String status){this.status=status;}
private static final long serialVersionUID = 1L;
public String getId() {
......
......@@ -38,6 +38,12 @@ public class GridTreeNode {
*/
private List<GridTreeNode> child = new ArrayList();
private String status;
public String getStatus(){return status;}
public void setStatus(String status){this.status=status;}
public String getLevel() {
return level;
}
......
......@@ -53,4 +53,6 @@ public interface GridRegionMapper {
List<GridRegion> getRegionByTypeAndCode(@Param("wgType")String wgType, @Param("wgCodeLikes")List<String> wgCodeLikes, @Param("level")String level);
List<GridRegion> getAllLevelThreeByType(@Param("type") String type,@Param("code") String code);
List<GridRegion> getAllLevelFourByType(@Param("type") String type,@Param("code") String code);
}
\ No newline at end of file
......@@ -1207,13 +1207,16 @@ public class GridRegionFacadeService {
type = "7";
}
List<GridRegion> threeLevelNode = gridRegionMapper.getAllLevelThreeByType(type,gridTreeNode1.getCode());
System.out.println(type+" "+gridTreeNode.getCode());
List<GridTreeNode> threeNodes = new ArrayList<>();
if(type.equals("1")){
System.out.println();
}
for(GridRegion gridRegion : threeLevelNode){
GridTreeNode treeNode = convertNodeToTree(gridRegion);
List<GridRegion> fourLevelNode = gridRegionMapper.getAllLevelFourByType(type,treeNode.getCode());
List<GridTreeNode> fourNodes = new ArrayList<>();
for(GridRegion gridFourRegion : fourLevelNode){
GridTreeNode treeFourNode = convertNodeToTree(gridFourRegion);
fourNodes.add(treeFourNode);
}
treeNode.setChild(fourNodes);
threeNodes.add(treeNode);
}
gridTreeNode1.setChild(threeNodes);
......@@ -1236,6 +1239,7 @@ public class GridRegionFacadeService {
firstNode.setWgArea(gridRegion.getWgArea());
firstNode.setWgCoordinate(gridRegion.getWgCoordinate());
firstNode.setWgCentreCoordinate(gridRegion.getWgCentreCoordinate());
firstNode.setStatus(gridRegion.getStatus());
return firstNode;
}
......
......@@ -87,7 +87,7 @@
<sql id="Base_Column_List">
id, wg_type, wg_code, wg_name, wg_parent_id, wg_area, wg_centre_coordinate,
wg_principal, create_time, create_by, update_time, update_by, level, is_valid, ylzd1,
ylzd2, ylzd3, ylzd4, ylzd5, wg_purpose
ylzd2, ylzd3, ylzd4, ylzd5, wg_purpose, status
</sql>
<sql id="Blob_Column_List">
wg_coordinate
......@@ -673,4 +673,12 @@
and wg_code like CONCAT(#{code}, '%')
and wg_code != #{code}
</select>
<select id="getAllLevelFourByType" resultType="com.ruoyi.system.domain.grid.GridRegion">
select
<include refid="Base_Column_List" />
from grid_region where is_valid = '1'
and level = 4 and wg_type = #{type}
and wg_code like CONCAT(#{code}, '%')
and wg_code != #{code}
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment