|
@@ -37,15 +37,15 @@ public class ZongZhiDataAnalysisPlatformServiceImpl implements PlatformService {
|
|
|
Date reportDate = queryPlatformParamDTO.getReportDate();
|
|
|
Date startDate = DateUtils.getFirstDayOfYear(reportDate);
|
|
|
while (startDate.before(DateUtils.getMonthOff(reportDate, 1))) {
|
|
|
- date_rateMap.put(startDate, getBianSunRate(queryPlatformParamDTO.getUserId(), queryPlatformParamDTO.getGroupCode(), pjId, startDate));
|
|
|
+ date_rateMap.put(startDate, getZongZhiRate(queryPlatformParamDTO.getUserId(), queryPlatformParamDTO.getGroupCode(), pjId, startDate));
|
|
|
startDate = DateUtils.getMonthOff(startDate, 1);
|
|
|
}
|
|
|
- List<Double> bianSunMonthlySummaries = date_rateMap.values().stream().collect(Collectors.toList());
|
|
|
- return bianSunMonthlySummaries;
|
|
|
+ List<Double> monthlySummaries = date_rateMap.values().stream().collect(Collectors.toList());
|
|
|
+ return monthlySummaries;
|
|
|
}
|
|
|
|
|
|
- private Double getBianSunRate(String userId, String groupCode, String projectId, Date reportDate) {
|
|
|
- Double bianSunRate = null;
|
|
|
+ private Double getZongZhiRate(String userId, String groupCode, String projectId, Date reportDate) {
|
|
|
+ Double rate = null;
|
|
|
try {
|
|
|
JSONObject paramObject = new JSONObject();
|
|
|
paramObject.put("userId", userId);
|
|
@@ -64,13 +64,13 @@ public class ZongZhiDataAnalysisPlatformServiceImpl implements PlatformService {
|
|
|
List<Map> content = (List<Map>) responseObject.get("content");
|
|
|
if (CollectionUtils.isNotEmpty(content)) {
|
|
|
Map data = content.get(0);
|
|
|
- bianSunRate = DataUtils.parseDouble(data.get("zongZhiRate"));
|
|
|
+ rate = DataUtils.parseDouble(data.get("zongZhiRate"));
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
- return bianSunRate;
|
|
|
+ return rate;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -90,9 +90,9 @@ public class ZongZhiDataAnalysisPlatformServiceImpl implements PlatformService {
|
|
|
// 未达标项目id列表
|
|
|
List<String> unsatisfiedPjIdList = new ArrayList<>();
|
|
|
for (String pjId : queryPlatformParamDTO.getProjectIdList()) {
|
|
|
- Double bianSunRate = getBianSunRate(queryPlatformParamDTO.getUserId(), queryPlatformParamDTO.getGroupCode(), pjId, queryPlatformParamDTO.getReportDate());
|
|
|
- if (null != bianSunRate && null != standardValue) {
|
|
|
- if (DataUtils.getQualifyResult(standardValue, qualifyFormula, bianSunRate) == 0.0) {
|
|
|
+ Double zongZhiRate = getZongZhiRate(queryPlatformParamDTO.getUserId(), queryPlatformParamDTO.getGroupCode(), pjId, queryPlatformParamDTO.getReportDate());
|
|
|
+ if (null != zongZhiRate && null != standardValue) {
|
|
|
+ if (DataUtils.getQualifyResult(standardValue, qualifyFormula, Math.abs(zongZhiRate)) == 0.0) {
|
|
|
unsatisfiedCount++;
|
|
|
unsatisfiedPjIdList.add(pjId);
|
|
|
} else {
|