|
@@ -4,15 +4,14 @@ import com.gyee.benchmarkingimpala.model.auto.Benchmarkingbetween;
|
|
|
import com.gyee.benchmarkingimpala.model.auto.Operationrecord;
|
|
|
import com.gyee.benchmarkingimpala.mapper.auto.OperationrecordMapper;
|
|
|
import com.gyee.benchmarkingimpala.model.auto.Windpowerstation;
|
|
|
+import com.gyee.benchmarkingimpala.model.auto.Windturbinetestingpointai2;
|
|
|
import com.gyee.benchmarkingimpala.service.auto.IOperationrecordService;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -35,4 +34,23 @@ public class OperationrecordServiceImpl extends ServiceImpl<OperationrecordMappe
|
|
|
return operationrecordMapper.listBy(WindPowerStation,wtid,beginDate,endDate);
|
|
|
}
|
|
|
|
|
|
+ public List<Map> conversion (String WindPowerStation,String wtid,Date beginDate, Date endDate) {
|
|
|
+ List<Map> map = operationrecordMapper.conversion(WindPowerStation,wtid,beginDate,endDate);
|
|
|
+
|
|
|
+ List<Map> conversiontype = new ArrayList<Map>();
|
|
|
+
|
|
|
+ for (int i = 0;i<map.size()-1;i++) {
|
|
|
+ Map<String, String> maps = new HashMap<>();
|
|
|
+ maps.put("zhsj",map.get(i).get("TIME").toString());//转换时间
|
|
|
+ maps.put("beforeConversion",map.get(i).get("VALUE").toString());//转换前状态
|
|
|
+ maps.put("AfterConversion",map.get(i+1).get("VALUE").toString());//转换后状态
|
|
|
+ maps.put("wtid",map.get(i).get("WTID").toString());
|
|
|
+ maps.put("name",map.get(i).get("NAME").toString());
|
|
|
+ maps.put("id",map.get(i).get("ID").toString());
|
|
|
+ maps.put("windpowerstationid",map.get(i).get("WINDPOWERSTATIONID").toString());
|
|
|
+ conversiontype.add(maps);
|
|
|
+ }
|
|
|
+ return conversiontype;
|
|
|
+ }
|
|
|
+
|
|
|
}
|