Commit 2b6d4173 by huangZW

111

parent be67b0c5
......@@ -17,6 +17,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
......@@ -147,12 +149,20 @@ public class DepartmentContoller extends WebBaseController{
}
Map<String,EnterpriseDTO> enterpriseMap = new HashMap<>();
for (String enterpriseId : enterpriseSet) {
EnterpriseDTO enterprise = enterpriseService.getEnterpriseById(enterpriseId);
if(enterprise != null){
enterpriseMap.put(enterpriseId, enterprise);
List<String> enterpriseSetList = new ArrayList<>(enterpriseSet);
List<EnterpriseDTO> enterprises = enterpriseService.listEnterpriseByIds(enterpriseSetList);
if(CollectionUtil.isNotEmpty(enterprises)){
for (EnterpriseDTO enterprise : enterprises) {
enterpriseMap.put(enterprise.getEnterpriseId(), enterprise);
}
}
}
//先注释调
// for (String enterpriseId : enterpriseSet) {
// EnterpriseDTO enterprise = enterpriseService.getEnterpriseById(enterpriseId);
// if(enterprise != null){
// enterpriseMap.put(enterpriseId, enterprise);
// }
// }
for (DepartmentDTO departmentDTO : list) {
String enterpriseId = departmentDTO.getEnterpriseId();
......
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