|
@@ -3,8 +3,8 @@ package com.persagy.apm.report.paragraphs.service.impl.iot;
|
|
|
import com.alibaba.excel.util.CollectionUtils;
|
|
|
import com.google.gson.Gson;
|
|
|
import com.google.gson.JsonSyntaxException;
|
|
|
-import com.persagy.apm.report.userconfig.function.model.Function;
|
|
|
-import com.persagy.apm.report.userconfig.function.service.IFunctionService;
|
|
|
+import com.persagy.apm.report.common.constants.DataConstants;
|
|
|
+import com.persagy.apm.report.common.utils.DataUtils;
|
|
|
import com.persagy.apm.report.detail.enums.AttrValueTypeEnum;
|
|
|
import com.persagy.apm.report.detail.model.vo.AttrValueVO;
|
|
|
import com.persagy.apm.report.detail.model.vo.GroupVO;
|
|
@@ -14,8 +14,11 @@ import com.persagy.apm.report.indicator.codes.iot.ProjectIotContentCodes;
|
|
|
import com.persagy.apm.report.indicator.codes.iot.ProjectIotHeaderCodes;
|
|
|
import com.persagy.apm.report.indicator.factory.IotFactory;
|
|
|
import com.persagy.apm.report.indicator.model.entity.IotDefine;
|
|
|
+import com.persagy.apm.report.indicator.utils.IndicatorUtils;
|
|
|
import com.persagy.apm.report.outline.model.ReportOutline;
|
|
|
import com.persagy.apm.report.paragraphs.service.impl.ProjectParagraphBuilder;
|
|
|
+import com.persagy.apm.report.userconfig.function.model.Function;
|
|
|
+import com.persagy.apm.report.userconfig.function.service.IFunctionService;
|
|
|
import org.mockito.internal.util.collections.Sets;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -50,8 +53,14 @@ public class ProjectIotBuilder extends ProjectParagraphBuilder {
|
|
|
String name = item.getName();
|
|
|
List<AttrValueVO> attrs = item.getAttrs();
|
|
|
Map<String, AttrValueVO> attrMap = attrValueList2Map(codeSet, attrs);
|
|
|
+ Double attrDoubleValue = IndicatorUtils.getAttrDoubleValue(
|
|
|
+ attrMap.get(ProjectIotContentCodes.currentMonth.name()));
|
|
|
+ if (attrDoubleValue != null) {
|
|
|
+ attrDoubleValue = DataUtils.doubleMultiply(attrDoubleValue, 100d);
|
|
|
+ }
|
|
|
+ String attrValueStr = attrDoubleValue == null ? "" : String.valueOf(attrDoubleValue);
|
|
|
String itemInfo = name + ":" +
|
|
|
- attrMap.get(ProjectIotContentCodes.currentMonth.name()).getValue() + " " +
|
|
|
+ attrValueStr + DataConstants.PERCENT + " " +
|
|
|
attrMap.get(ProjectIotContentCodes.isQualified.name()).getValue();
|
|
|
|
|
|
itemsSummary = itemsSummary == null ? itemInfo : itemsSummary + "," + itemInfo;
|