diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java b/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java index 3d329a50..44d874a3 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java @@ -2,6 +2,8 @@ package io.renren.modules.processForm.controller; import com.alibaba.excel.EasyExcel; import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import io.renren.common.annotation.LogOperation; import io.renren.common.constant.Constant; @@ -26,7 +28,6 @@ import io.renren.modules.processForm.excel.TAbilityApplicationExcel; import io.renren.modules.processForm.service.TAbilityApplicationService; import io.renren.modules.reminders.service.TRemindersService; import io.renren.modules.resource.dto.ResourceDTO; -import io.renren.modules.resource.entity.AttrEntity; import io.renren.modules.resource.excel.census.config.CustomCellWriteHeightConfig; import io.renren.modules.resource.excel.census.config.CustomCellWriteWeightConfig; import io.renren.modules.resource.service.ResourceService; @@ -803,13 +804,14 @@ public class TAbilityApplicationController { temp.put("createDate", index.getCreateDate()); temp.put("system", index.getSystem()); temp.put("resourceId", index.getResourceId()); - ResourceDTO resourceDTO = resourceService.selectWithAttrs(Long.parseLong(index.getResourceId())); + ResourceDTO resourceDTO = resourceService.get(Long.parseLong(index.getResourceId())); if ("应用资源".equals(resourceDTO.getType())) { temp.put("resourceTYpe", "应用资源"); } else if ("组件服务".equals(resourceDTO.getType())) { - Optional optional = resourceDTO.getInfoList().stream().filter(index_ -> "组件类型".equals(index_.getAttrType())).findFirst(); + JSONArray jsonArray = JSONArray.parseArray(JSONObject.toJSONString(resourceDTO.getInfoList())); + Optional optional = jsonArray.stream().map(index_ -> (JSONObject) index_).filter(index_ -> "组件类型".equals(index_.getString("attrType"))).map(index_ -> index_.getString("attrValue")).findFirst(); if (optional.isPresent()) { - temp.put("resourceTYpe", optional.get().getAttrValue()); + temp.put("resourceTYpe", optional.get()); } } return temp;