|
@@ -2,7 +2,9 @@ package com.jpsoft.campus.modules.base.controller;
|
|
|
|
|
|
import com.github.pagehelper.Page;
|
|
|
import com.jpsoft.campus.modules.base.entity.DistrictInfo;
|
|
|
+import com.jpsoft.campus.modules.base.entity.SchoolInfo;
|
|
|
import com.jpsoft.campus.modules.base.service.DistrictInfoService;
|
|
|
+import com.jpsoft.campus.modules.base.service.SchoolInfoService;
|
|
|
import com.jpsoft.campus.modules.common.dto.Sort;
|
|
|
import com.jpsoft.campus.modules.common.dto.MessageResult;
|
|
|
import com.jpsoft.campus.modules.common.utils.PojoUtils;
|
|
@@ -30,6 +32,9 @@ public class DistrictInfoController {
|
|
|
@Autowired
|
|
|
private DataDictionaryService dataDictionaryService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private SchoolInfoService schoolInfoService;
|
|
|
+
|
|
|
@ApiOperation(value="创建空记录")
|
|
|
@GetMapping("create")
|
|
|
public MessageResult<DistrictInfo> create(){
|
|
@@ -234,6 +239,16 @@ public class DistrictInfoController {
|
|
|
String streeName = dataDictionaryService.getName(districtInfo.getStreetId());
|
|
|
districtInfo.setStreetName(streeName);
|
|
|
}
|
|
|
+
|
|
|
+ String[] schoolIds = districtInfo.getSchoolId().split(",");
|
|
|
+ StringJoiner schoolNames = new StringJoiner(",");
|
|
|
+
|
|
|
+ for (String schoolId : schoolIds) {
|
|
|
+ SchoolInfo schoolInfo = schoolInfoService.get(schoolId);
|
|
|
+ schoolNames.add(schoolInfo.getName());
|
|
|
+ }
|
|
|
+
|
|
|
+ districtInfo.setSchoolName(schoolNames.toString());
|
|
|
}
|
|
|
|
|
|
msgResult.setResult(true);
|