zhongrj
2024-12-16 5831d6357e0976c03b7f2260ca4e9eb04bdb2be2
skjcmanager/skjcmanager-service/skjcmanager-nky/src/main/java/cn/gistack/nky/service/impl/ArimaPredictServiceImpl.java
@@ -9,9 +9,12 @@
import cn.gistack.nky.service.IArimaPredictService;
import cn.gistack.nky.service.INkyService;
import cn.gistack.nky.service.IZtApiService;
import cn.gistack.nky.vo.ArimaPredictVO;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.AllArgsConstructor;
import org.apache.logging.log4j.util.Strings;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.ObjectUtil;
@@ -79,10 +82,22 @@
   }
   @Override
   public List<ArimaPredict> getFutureData(String resCd,String type) {
      List<ArimaPredict> futureData = baseMapper.getFutureData(resCd, type);
   public List<ArimaPredictVO> getFutureData(String resCd, String type) {
      List<ArimaPredictVO> futureData = new ArrayList<>();
      if (type.equals("3")){
         //位移另一张表
//         futureData=baseMapper.getFutureDataWy(resCd,type);
         futureData=baseMapper.getFutureDataWy2(resCd,type);
      }else{
//          futureData = baseMapper.getFutureData(resCd, type);
          futureData = baseMapper.getFutureData2(resCd, type);
      }
      futureData.forEach(arimaPredict -> {
         arimaPredict.setPredicts(JSON.parse(arimaPredict.getPredicts().toString()));
//         arimaPredict.setValue(JSON.parse(arimaPredict.getValue()).toString());
         if (!Strings.isBlank(arimaPredict.getValue())) {
            arimaPredict.setPredicts(JSON.parse(arimaPredict.getValue()));
         }
      });
      return futureData;
   }