|
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.pavis.ai.app.fda.common.utils.DateUtils;
|
|
import com.pavis.ai.app.fda.common.utils.DateUtils;
|
|
|
|
+import com.pavis.ai.app.fda.common.utils.GeneralUtils;
|
|
import com.pavis.ai.app.fda.form.TestCommon;
|
|
import com.pavis.ai.app.fda.form.TestCommon;
|
|
import com.pavis.ai.app.fda.form.follow.Follower;
|
|
import com.pavis.ai.app.fda.form.follow.Follower;
|
|
import com.pavis.ai.app.fda.form.his.IndustryDetail;
|
|
import com.pavis.ai.app.fda.form.his.IndustryDetail;
|
|
@@ -275,7 +276,7 @@ public class SearchServiceImpl implements SearchService {
|
|
Float value = calLastWeekActual(date,followInfo.getPlateId());
|
|
Float value = calLastWeekActual(date,followInfo.getPlateId());
|
|
incInfo = IncInfo.builder()
|
|
incInfo = IncInfo.builder()
|
|
.industryId(followInfo.getPlateId())
|
|
.industryId(followInfo.getPlateId())
|
|
- .industryValue(value)
|
|
|
|
|
|
+ .industryValue(GeneralUtils.toFloatByTwo(value))
|
|
.industryTag(value > 0.0F ? true : false)
|
|
.industryTag(value > 0.0F ? true : false)
|
|
.industryName(followInfo.getPlateName())
|
|
.industryName(followInfo.getPlateName())
|
|
.build();
|
|
.build();
|
|
@@ -523,7 +524,7 @@ public class SearchServiceImpl implements SearchService {
|
|
incInfo = IncInfo.builder()
|
|
incInfo = IncInfo.builder()
|
|
.industryId(plate.getPlateId())
|
|
.industryId(plate.getPlateId())
|
|
.industryName(plate.getPlateName())
|
|
.industryName(plate.getPlateName())
|
|
- .industryValue(value)
|
|
|
|
|
|
+ .industryValue(GeneralUtils.toFloatByTwo(value))
|
|
.industryTag(industryTag)
|
|
.industryTag(industryTag)
|
|
.build();
|
|
.build();
|
|
incInfos.add(incInfo);
|
|
incInfos.add(incInfo);
|
|
@@ -625,7 +626,7 @@ public class SearchServiceImpl implements SearchService {
|
|
// .industryName(plate.getPlateName())
|
|
// .industryName(plate.getPlateName())
|
|
// todo 后期需要修改。
|
|
// todo 后期需要修改。
|
|
.industryName(infos.get(0).getPlateName())
|
|
.industryName(infos.get(0).getPlateName())
|
|
- .industryValue(value)
|
|
|
|
|
|
+ .industryValue(GeneralUtils.toFloatByTwo(value))
|
|
.industryTag(industryTag)
|
|
.industryTag(industryTag)
|
|
.build();
|
|
.build();
|
|
incInfos.add(incInfo);
|
|
incInfos.add(incInfo);
|
|
@@ -828,7 +829,7 @@ public class SearchServiceImpl implements SearchService {
|
|
Float lastClose = industryPlatesLast.size() > 0 ? null != industryPlatesLast.get(0).getPlateClose() ?
|
|
Float lastClose = industryPlatesLast.size() > 0 ? null != industryPlatesLast.get(0).getPlateClose() ?
|
|
industryPlatesLast.get(0).getPlateClose() : 0.0F : 0.0F;
|
|
industryPlatesLast.get(0).getPlateClose() : 0.0F : 0.0F;
|
|
Float value = close - lastClose;
|
|
Float value = close - lastClose;
|
|
- return value;
|
|
|
|
|
|
+ return GeneralUtils.toFloatByTwo(value);
|
|
}
|
|
}
|
|
|
|
|
|
public Float getPredValue(List<IndustryPlate> industryPlates,List<IndustryPlate> industryPlatesLast){
|
|
public Float getPredValue(List<IndustryPlate> industryPlates,List<IndustryPlate> industryPlatesLast){
|
|
@@ -837,7 +838,7 @@ public class SearchServiceImpl implements SearchService {
|
|
Float lastPred = industryPlatesLast.size() > 0 ? null != industryPlatesLast.get(0).getPlateClosePred() ?
|
|
Float lastPred = industryPlatesLast.size() > 0 ? null != industryPlatesLast.get(0).getPlateClosePred() ?
|
|
industryPlatesLast.get(0).getPlateClosePred() : 0.0F : 0.0F;
|
|
industryPlatesLast.get(0).getPlateClosePred() : 0.0F : 0.0F;
|
|
Float value = pred - lastPred;
|
|
Float value = pred - lastPred;
|
|
- return value;
|
|
|
|
|
|
+ return GeneralUtils.toFloatByTwo(value);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1021,7 +1022,7 @@ public class SearchServiceImpl implements SearchService {
|
|
.industryId(industryPlateRes.getPlateId())
|
|
.industryId(industryPlateRes.getPlateId())
|
|
// .industryName(plate.getPlateName())
|
|
// .industryName(plate.getPlateName())
|
|
.industryName(industryPlateRes.getPlateName())
|
|
.industryName(industryPlateRes.getPlateName())
|
|
- .industryValue(actualVal)
|
|
|
|
|
|
+ .industryValue(GeneralUtils.toFloatByTwo(actualVal))
|
|
.industryTag(industryTag)
|
|
.industryTag(industryTag)
|
|
.build();
|
|
.build();
|
|
incInfos.add(incInfo);
|
|
incInfos.add(incInfo);
|
|
@@ -1046,7 +1047,7 @@ public class SearchServiceImpl implements SearchService {
|
|
// .industryName(plate.getPlateName())
|
|
// .industryName(plate.getPlateName())
|
|
// todo 后期需要修改。
|
|
// todo 后期需要修改。
|
|
.industryName(industryPlateRes.getPlateName())
|
|
.industryName(industryPlateRes.getPlateName())
|
|
- .industryValue(predVal)
|
|
|
|
|
|
+ .industryValue(GeneralUtils.toFloatByTwo(predVal))
|
|
.industryTag(industryTag)
|
|
.industryTag(industryTag)
|
|
.build();
|
|
.build();
|
|
incInfos.add(incInfo);
|
|
incInfos.add(incInfo);
|
|
@@ -1262,7 +1263,7 @@ public class SearchServiceImpl implements SearchService {
|
|
// .industryName(plate.getPlateName())
|
|
// .industryName(plate.getPlateName())
|
|
// todo 后期需要修改。
|
|
// todo 后期需要修改。
|
|
.industryName(industryPlateRes.getPlateName())
|
|
.industryName(industryPlateRes.getPlateName())
|
|
- .industryValue(value)
|
|
|
|
|
|
+ .industryValue(GeneralUtils.toFloatByTwo(value))
|
|
.industryTag(value > 0.0F ? true : false)
|
|
.industryTag(value > 0.0F ? true : false)
|
|
.build();
|
|
.build();
|
|
incInfos.add(incInfo);
|
|
incInfos.add(incInfo);
|