|
@@ -1,13 +1,9 @@
|
|
|
package com.gyee.benchmarkingimpala.service.auto.impl;
|
|
|
|
|
|
-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;
|
|
@@ -33,40 +29,34 @@ public class OperationrecordServiceImpl extends ServiceImpl<OperationrecordMappe
|
|
|
public List<Map> listBy (String WindPowerStation,String wtid,Date beginDate, Date endDate) {
|
|
|
List<Map> map = operationrecordMapper.listBy(WindPowerStation,wtid,beginDate,endDate);
|
|
|
|
|
|
-// for (int i = 0;i<map.size();i++) {
|
|
|
-// map.get(i).put("ConversionName",Statedescription(map.get(i).get("VALUE").toString()));
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
List<Map> conversiontype = new ArrayList<Map>();
|
|
|
|
|
|
for (int i = 0;i<map.size();i++) {
|
|
|
Map<String, String> maps = new HashMap<>();
|
|
|
maps.put("zhsj",map.get(i).get("TIME").toString());//时间
|
|
|
- maps.put("ConversionName",Statedescription(map.get(i).get("VALUE").toString()));//状态描述
|
|
|
+ maps.put("ConversionName", stateDescriPtion(map.get(i).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;
|
|
|
|
|
|
}
|
|
|
|
|
|
public List<Map> conversion (String WindPowerStation,String wtid,Date beginDate, Date endDate) {
|
|
|
- List<Map> map = operationrecordMapper.conversion(WindPowerStation,wtid,beginDate,endDate);
|
|
|
+ List<Map> map = operationrecordMapper.listBy(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("beforeConversionName",Statedescription(map.get(i).get("VALUE").toString()));//转换前状态描述
|
|
|
-// maps.put("AfterConversion",map.get(i+1).get("VALUE").toString());//转换后状态
|
|
|
- maps.put("AfterConversionName",Statedescription(map.get(i+1).get("VALUE").toString()));//转换后状态描述
|
|
|
+ maps.put("beforeConversion",map.get(i).get("VALUE").toString());//转换前状态
|
|
|
+ maps.put("beforeConversionName", stateDescriPtion(map.get(i).get("VALUE").toString()));//转换前状态描述
|
|
|
+ maps.put("AfterConversion",map.get(i+1).get("VALUE").toString());//转换后状态
|
|
|
+ maps.put("AfterConversionName", stateDescriPtion(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());
|
|
@@ -78,7 +68,7 @@ public class OperationrecordServiceImpl extends ServiceImpl<OperationrecordMappe
|
|
|
}
|
|
|
|
|
|
|
|
|
- public static String Statedescription(String code) {
|
|
|
+ public static String stateDescriPtion(String code) {
|
|
|
|
|
|
|
|
|
String name = "VALUE";
|
|
@@ -121,6 +111,7 @@ public class OperationrecordServiceImpl extends ServiceImpl<OperationrecordMappe
|
|
|
name = "取消挂牌";
|
|
|
break;
|
|
|
default:
|
|
|
+ break;
|
|
|
|
|
|
}
|
|
|
return name;
|