|
|
@@ -1,6 +1,7 @@
|
|
|
package cn.com.yusys.yusp.service.impl;
|
|
|
|
|
|
import cn.com.yusys.yusp.commons.exception.BizException;
|
|
|
+import cn.com.yusys.yusp.commons.util.date.DateUtils;
|
|
|
import cn.com.yusys.yusp.config.DataDictionary;
|
|
|
import cn.com.yusys.yusp.domain.entity.AitagTagInfoEntity;
|
|
|
import cn.com.yusys.yusp.domain.vo.*;
|
|
|
@@ -87,17 +88,15 @@ public class AitagTagLogServiceImpl extends ServiceImpl<AitagTagLogDao, AitagTag
|
|
|
|
|
|
@Override
|
|
|
public List<IconResVo> taggingTrend(TaggingTrendReqVo taggingTrendReqVo) {
|
|
|
- String statisticalPeriod = taggingTrendReqVo.getStatisticalPeriod();
|
|
|
+ String startTaggingTime = taggingTrendReqVo.getStartTaggingTime();
|
|
|
+ String endTaggingTime = taggingTrendReqVo.getEndTaggingTime();
|
|
|
+
|
|
|
+ int daysByTwoDatesDef = DateUtils.getDaysByTwoDatesDef(startTaggingTime, endTaggingTime);
|
|
|
List<IconResVo> taggingTrendResVo = null;
|
|
|
- switch (statisticalPeriod){
|
|
|
- case DAY:
|
|
|
- taggingTrendResVo = this.baseMapper.selectTagReportByDay(taggingTrendReqVo);
|
|
|
- break;
|
|
|
- case MONTH:
|
|
|
- taggingTrendResVo = this.baseMapper.selectTagReportByMonth(taggingTrendReqVo);
|
|
|
- break;
|
|
|
- default:
|
|
|
- throw BizException.of("NO_DATA_PERIOD");
|
|
|
+ if(daysByTwoDatesDef>=15){
|
|
|
+ taggingTrendResVo = this.baseMapper.selectTagReportByDay(taggingTrendReqVo);
|
|
|
+ }else{
|
|
|
+ taggingTrendResVo = this.baseMapper.selectTagReportByMonth(taggingTrendReqVo);
|
|
|
}
|
|
|
return taggingTrendResVo;
|
|
|
}
|