|
@@ -121,7 +121,7 @@ public class PrimarySchoolApiController {
|
|
|
@GetMapping("queryDistrictSchoolList")
|
|
|
@ApiOperation(value = "查询社区学校列表")
|
|
|
@ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name = "id", value = "社区编号", required = true, paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "id", value = "社区编号", required = false, paramType = "query"),
|
|
|
@ApiImplicitParam(name = "schoolType", value = "学校类型 (1小学2初中,不传默认为小学)", required = false, paramType = "query")
|
|
|
})
|
|
|
public MessageResult<List> queryDistrictSchoolList(String id,
|
|
@@ -130,22 +130,22 @@ public class PrimarySchoolApiController {
|
|
|
MessageResult<List> messageResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
|
- DistrictInfo districtInfo = districtInfoService.get(id);
|
|
|
-
|
|
|
- List<String> schoolIdList = Arrays.asList(districtInfo.getSchoolId().split(","));
|
|
|
- List<SchoolInfo> list = new ArrayList<>();
|
|
|
- if (schoolIdList.size()>0){
|
|
|
- for (String schoolId : schoolIdList){
|
|
|
- SchoolInfo schoolInfo = schoolInfoService.get(schoolId);
|
|
|
- if (schoolInfo != null){
|
|
|
- if(schoolInfo.getEnrollmentType().contains(schoolType) && schoolInfo.getIsOpen()){
|
|
|
- list.add(schoolInfo);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ //DistrictInfo districtInfo = districtInfoService.get(id);
|
|
|
+ //List<String> schoolIdList = Arrays.asList(districtInfo.getSchoolId().split(","));
|
|
|
+// List<SchoolInfo> list = new ArrayList<>();
|
|
|
+// if (schoolIdList.size()>0){
|
|
|
+// for (String schoolId : schoolIdList){
|
|
|
+// SchoolInfo schoolInfo = schoolInfoService.get(schoolId);
|
|
|
+// if (schoolInfo != null){
|
|
|
+// if(schoolInfo.getEnrollmentType().contains(schoolType) && schoolInfo.getIsOpen()){
|
|
|
+// list.add(schoolInfo);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+ List<SchoolInfo> schoolIdList = schoolInfoService.findByEnrollmentType(schoolType);
|
|
|
|
|
|
- messageResult.setData(list);
|
|
|
+ messageResult.setData(schoolIdList);
|
|
|
messageResult.setResult(true);
|
|
|
}
|
|
|
catch (Exception ex){
|
|
@@ -621,11 +621,11 @@ public class PrimarySchoolApiController {
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
sortList.add(new Sort("create_time","desc"));
|
|
|
|
|
|
- List<ApplicationPrimary> applicationPrimaryList = applicationPrimaryDAO.search(searchParams,sortList);
|
|
|
+ //List<ApplicationPrimary> applicationPrimaryList = applicationPrimaryDAO.search(searchParams,sortList);
|
|
|
|
|
|
Map<String,Object> map = new HashMap<>();
|
|
|
map.put("id",applicationPrimary.getId());
|
|
|
- map.put("num",applicationPrimaryList.size());
|
|
|
+ //map.put("num",applicationPrimaryList.size());
|
|
|
|
|
|
messageResult.setData(map);
|
|
|
messageResult.setResult(true);
|