Merge branch 'master' into docker_package

This commit is contained in:
wangliwen 2023-01-10 15:59:34 +08:00
commit 596b7e0db4
1 changed files with 6 additions and 4 deletions

View File

@ -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<AttrEntity> optional = resourceDTO.getInfoList().stream().filter(index_ -> "组件类型".equals(index_.getAttrType())).findFirst();
JSONArray jsonArray = JSONArray.parseArray(JSONObject.toJSONString(resourceDTO.getInfoList()));
Optional<String> 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;