|
@@ -34,9 +34,17 @@ public class ToolUtils {
|
|
|
*/
|
|
|
public List getSectionList(HttpServletRequest request){
|
|
|
String username = request.getParameter("username");
|
|
|
- if (username == null || username.toString().length() == 0) return Collections.singletonList(new int[]{0});
|
|
|
+ ArrayList<Object> sectionList = new ArrayList<>();
|
|
|
+
|
|
|
+ if (username == null || username.toString().length() == 0) {
|
|
|
+ sectionList.add(0);
|
|
|
+ return sectionList;
|
|
|
+ }
|
|
|
UserDTO user1 = userService.findUserByUserName(username);
|
|
|
- if (user1 == null) return Collections.singletonList(new int[]{0});
|
|
|
+ if (user1 == null) {
|
|
|
+ sectionList.add(0);
|
|
|
+ return sectionList;
|
|
|
+ }
|
|
|
|
|
|
String provinceid = request.getParameter("provinceid");
|
|
|
provinceid = provinceid == null || provinceid.equals("0") ? request.getParameter("provinceId") : provinceid;
|
|
@@ -47,7 +55,7 @@ public class ToolUtils {
|
|
|
String sectionid = request.getParameter("sectionid");
|
|
|
sectionid = sectionid == null || sectionid.equals("0") ? request.getParameter("sectionId") : sectionid;
|
|
|
|
|
|
- ArrayList<Object> sectionList = new ArrayList<>();
|
|
|
+
|
|
|
if (sectionid != null && sectionid.length() != 0 && !sectionid.equals("0")){
|
|
|
sectionList.add(sectionid);
|
|
|
return sectionList;
|
|
@@ -97,7 +105,9 @@ public class ToolUtils {
|
|
|
return Arrays.asList(zone.split(","));
|
|
|
}
|
|
|
}else {
|
|
|
- maps = sectionService.getListByPid(Integer.valueOf(areaid));
|
|
|
+ System.out.println(areaid);
|
|
|
+ int areaid2 = Integer.valueOf(areaid);
|
|
|
+ maps = sectionService.getListByPid(areaid2);
|
|
|
}
|
|
|
}
|
|
|
for (SectionDTO map:maps) {
|