|
@@ -11,6 +11,7 @@ import com.persagy.apm.common.model.dto.Sort;
|
|
|
import com.persagy.apm.energy.report.centermiddleware.model.dto.QueryItemInfoDTO;
|
|
|
import com.persagy.apm.energy.report.centermiddleware.service.ICenterMiddlewareWebService;
|
|
|
import com.persagy.apm.energy.report.monthly.config.function.constant.enums.EnergyTypeEnum;
|
|
|
+import com.persagy.apm.energy.report.monthly.config.function.constant.enums.FunctionTypeEnum;
|
|
|
import com.persagy.apm.energy.report.monthly.config.function.dao.FunctionMapper;
|
|
|
import com.persagy.apm.energy.report.monthly.config.function.model.ConvertFunctionTool;
|
|
|
import com.persagy.apm.energy.report.monthly.config.function.model.Function;
|
|
@@ -260,20 +261,16 @@ public class FunctionServiceImpl extends ServiceImpl<FunctionMapper, Function>
|
|
|
// 注意这里应该传入项目本地编码
|
|
|
queryItemInfoDTO.setProjectId(simpleProjectInfo.getProjectLocalID());
|
|
|
queryItemInfoDTO.setBuildingId(simpleProjectInfo.getProjectLocalID());
|
|
|
- String defaultNoItemId = "sumItem";
|
|
|
- if (defaultNoItemId.equals(function.getItemId())) {
|
|
|
- if (StringUtils.isBlank(function.getEnergyType())) {
|
|
|
- return "";
|
|
|
- }
|
|
|
- EnergyTypeEnum energyTypeEnum = EnergyTypeEnum.getByType(Integer.parseInt(function.getEnergyType()));
|
|
|
- return energyTypeEnum.getDesc();
|
|
|
- } else {
|
|
|
+ if (EnergyTypeEnum.ELECTRICITY.getType().toString().equals(function.getEnergyType())
|
|
|
+ && FunctionTypeEnum.ENERGY.getType().equals(function.getFunctionType())) {
|
|
|
queryItemInfoDTO.setModelCode(function.getModelCode());
|
|
|
queryItemInfoDTO.setItemIdList(Lists.newArrayList(function.getItemId()));
|
|
|
Map<String, String> itemNameMap = centerMiddlewareWebService.getItemNameMap(queryItemInfoDTO);
|
|
|
if (itemNameMap != null) {
|
|
|
return itemNameMap.get(function.getItemId());
|
|
|
}
|
|
|
+ } else {
|
|
|
+ return function.getName();
|
|
|
}
|
|
|
|
|
|
return "";
|