|
@@ -5,6 +5,7 @@ import com.gyee.common.model.StringUtils;
|
|
|
import com.gyee.common.util.DateUtils;
|
|
|
import com.gyee.common.util.DoubleUtils;
|
|
|
import com.gyee.common.vo.specific.SpecificCenterVo;
|
|
|
+import com.gyee.common.vo.specific.SpecificTarget;
|
|
|
import com.gyee.common.vo.specific.SpecificTargetVo;
|
|
|
import com.gyee.common.vo.specific.SpecificTopVo;
|
|
|
import com.gyee.runeconomy.init.CacheContext;
|
|
@@ -605,7 +606,7 @@ public class SpecificService {
|
|
|
* @param year
|
|
|
* @return
|
|
|
*/
|
|
|
- public List<SpecificTargetVo> fnlylList(String companys, String type, String year) {
|
|
|
+ public List<SpecificTarget> fnlylList(String companys, String type, String year) {
|
|
|
|
|
|
//获取年份所有当月的数据
|
|
|
QueryWrapper<ProEconPowerstationInfoDay1> currentqw = new QueryWrapper<>();
|
|
@@ -669,6 +670,7 @@ public class SpecificService {
|
|
|
}else{
|
|
|
vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
}
|
|
|
+
|
|
|
vo.setYear(DateUtils.getYear(i.getRecordDate()));
|
|
|
vo.setMonth(DateUtils.getMonth(i.getRecordDate()));
|
|
|
vo.setCurrent(DoubleUtils.keepPrecision(i.getYllfdl().doubleValue()!=0?i.getYfdl().doubleValue()/i.getYllfdl().doubleValue()*100:0,2));
|
|
@@ -687,11 +689,70 @@ public class SpecificService {
|
|
|
i.setCompare(0);
|
|
|
}
|
|
|
});
|
|
|
- return resultList;
|
|
|
+ List<SpecificTarget> resultendList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
|
|
|
+
|
|
|
+ resultList.stream().forEach(i->{
|
|
|
+ if (map.containsKey(i.getWpid())){
|
|
|
+ Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
|
|
|
+ if (!integerListMap.containsKey(i.getMonth())){
|
|
|
+ map.get(i.getWpid()).put(i.getMonth(),i);
|
|
|
+ }else {
|
|
|
+
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
|
|
|
+ tempMap.put(i.getMonth(),i);
|
|
|
+ map.put(i.getWpid(),tempMap);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ Set<String> wpids = map.keySet();
|
|
|
+ if (StringUtils.isNotNull(wpids)){
|
|
|
+ wpids.stream().forEach(wpid->{
|
|
|
+ SpecificTarget vo = new SpecificTarget();
|
|
|
+ vo.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ List<SpecificTargetVo> tempList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
|
|
|
+ for(int x = 1;x<=12;x++){
|
|
|
+ if (listMap.containsKey(x)){
|
|
|
+ tempList.add(listMap.get(x));
|
|
|
+ }else {
|
|
|
+ SpecificTargetVo vo1 = new SpecificTargetVo();
|
|
|
+ vo1.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ vo1.setYear(Integer.parseInt(year));
|
|
|
+ vo1.setMonth(x);
|
|
|
+ tempList.add(vo1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ vo.setTargetList(tempList);
|
|
|
+ resultendList.add(vo);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return resultendList;
|
|
|
}
|
|
|
|
|
|
|
|
|
- public List<SpecificTargetVo> fdlList(String companys, String type, String year) {
|
|
|
+ public List<SpecificTarget> fdlList(String companys, String type, String year) {
|
|
|
//获取年份所有当月的数据
|
|
|
QueryWrapper<ProEconPowerstationInfoDay1> currentqw = new QueryWrapper<>();
|
|
|
currentqw.select("foreign_key_id,max(record_date) record_date,max(yfdl) yfdl");
|
|
@@ -772,10 +833,69 @@ public class SpecificService {
|
|
|
i.setCompare(0);
|
|
|
}
|
|
|
});
|
|
|
- return resultList;
|
|
|
+ List<SpecificTarget> resultendList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
|
|
|
+
|
|
|
+ resultList.stream().forEach(i->{
|
|
|
+ if (map.containsKey(i.getWpid())){
|
|
|
+ Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
|
|
|
+ if (!integerListMap.containsKey(i.getMonth())){
|
|
|
+ map.get(i.getWpid()).put(i.getMonth(),i);
|
|
|
+ }else {
|
|
|
+
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
|
|
|
+ tempMap.put(i.getMonth(),i);
|
|
|
+ map.put(i.getWpid(),tempMap);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ Set<String> wpids = map.keySet();
|
|
|
+ if (StringUtils.isNotNull(wpids)){
|
|
|
+ wpids.stream().forEach(wpid->{
|
|
|
+ SpecificTarget vo = new SpecificTarget();
|
|
|
+ vo.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ List<SpecificTargetVo> tempList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
|
|
|
+ for(int x = 1;x<=12;x++){
|
|
|
+ if (listMap.containsKey(x)){
|
|
|
+ tempList.add(listMap.get(x));
|
|
|
+ }else {
|
|
|
+ SpecificTargetVo vo1 = new SpecificTargetVo();
|
|
|
+ vo1.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ vo1.setYear(Integer.parseInt(year));
|
|
|
+ vo1.setMonth(x);
|
|
|
+ tempList.add(vo1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ vo.setTargetList(tempList);
|
|
|
+ resultendList.add(vo);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return resultendList;
|
|
|
}
|
|
|
|
|
|
- public List<SpecificTargetVo> zhcydlList(String companys, String type, String year) {
|
|
|
+ public List<SpecificTarget> zhcydlList(String companys, String type, String year) {
|
|
|
//获取年份所有当月的数据
|
|
|
QueryWrapper<ProEconPowerstationInfoDay5> currentqw = new QueryWrapper<>();
|
|
|
currentqw.select("foreign_key_id,max(record_date) record_date,max(yzhcydldb) yzhcydldb");
|
|
@@ -856,11 +976,70 @@ public class SpecificService {
|
|
|
i.setCompare(0);
|
|
|
}
|
|
|
});
|
|
|
- return resultList;
|
|
|
+ List<SpecificTarget> resultendList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
|
|
|
+
|
|
|
+ resultList.stream().forEach(i->{
|
|
|
+ if (map.containsKey(i.getWpid())){
|
|
|
+ Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
|
|
|
+ if (!integerListMap.containsKey(i.getMonth())){
|
|
|
+ map.get(i.getWpid()).put(i.getMonth(),i);
|
|
|
+ }else {
|
|
|
+
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
|
|
|
+ tempMap.put(i.getMonth(),i);
|
|
|
+ map.put(i.getWpid(),tempMap);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ Set<String> wpids = map.keySet();
|
|
|
+ if (StringUtils.isNotNull(wpids)){
|
|
|
+ wpids.stream().forEach(wpid->{
|
|
|
+ SpecificTarget vo = new SpecificTarget();
|
|
|
+ vo.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ List<SpecificTargetVo> tempList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
|
|
|
+ for(int x = 1;x<=12;x++){
|
|
|
+ if (listMap.containsKey(x)){
|
|
|
+ tempList.add(listMap.get(x));
|
|
|
+ }else {
|
|
|
+ SpecificTargetVo vo1 = new SpecificTargetVo();
|
|
|
+ vo1.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ vo1.setYear(Integer.parseInt(year));
|
|
|
+ vo1.setMonth(x);
|
|
|
+ tempList.add(vo1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ vo.setTargetList(tempList);
|
|
|
+ resultendList.add(vo);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return resultendList;
|
|
|
|
|
|
}
|
|
|
|
|
|
- public List<SpecificTargetVo> gzsslList(String companys, String type, String year) {
|
|
|
+ public List<SpecificTarget> gzsslList(String companys, String type, String year) {
|
|
|
//获取年份所有当月的数据
|
|
|
QueryWrapper<ProEconPowerstationInfoDay1> currentqw = new QueryWrapper<>();
|
|
|
currentqw.select("foreign_key_id,max(record_date) record_date,max(ygzssdl) ygzssdl,max(ycnslgzssdl) ycnslgzssdl,max(yllfdl) yllfdl");
|
|
@@ -941,10 +1120,69 @@ public class SpecificService {
|
|
|
i.setCompare(0);
|
|
|
}
|
|
|
});
|
|
|
- return resultList;
|
|
|
+ List<SpecificTarget> resultendList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
|
|
|
+
|
|
|
+ resultList.stream().forEach(i->{
|
|
|
+ if (map.containsKey(i.getWpid())){
|
|
|
+ Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
|
|
|
+ if (!integerListMap.containsKey(i.getMonth())){
|
|
|
+ map.get(i.getWpid()).put(i.getMonth(),i);
|
|
|
+ }else {
|
|
|
+
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
|
|
|
+ tempMap.put(i.getMonth(),i);
|
|
|
+ map.put(i.getWpid(),tempMap);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ Set<String> wpids = map.keySet();
|
|
|
+ if (StringUtils.isNotNull(wpids)){
|
|
|
+ wpids.stream().forEach(wpid->{
|
|
|
+ SpecificTarget vo = new SpecificTarget();
|
|
|
+ vo.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ List<SpecificTargetVo> tempList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
|
|
|
+ for(int x = 1;x<=12;x++){
|
|
|
+ if (listMap.containsKey(x)){
|
|
|
+ tempList.add(listMap.get(x));
|
|
|
+ }else {
|
|
|
+ SpecificTargetVo vo1 = new SpecificTargetVo();
|
|
|
+ vo1.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ vo1.setYear(Integer.parseInt(year));
|
|
|
+ vo1.setMonth(x);
|
|
|
+ tempList.add(vo1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ vo.setTargetList(tempList);
|
|
|
+ resultendList.add(vo);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return resultendList;
|
|
|
}
|
|
|
|
|
|
- public List<SpecificTargetVo> whsslList(String companys, String type, String year) {
|
|
|
+ public List<SpecificTarget> whsslList(String companys, String type, String year) {
|
|
|
//获取年份所有当月的数据
|
|
|
QueryWrapper<ProEconPowerstationInfoDay1> currentqw = new QueryWrapper<>();
|
|
|
currentqw.select("foreign_key_id,max(record_date) record_date,max(yjxssdl) yjxssdl,max(ycnsljxssdl) ycnsljxssdl,max(yllfdl) yllfdl");
|
|
@@ -1025,10 +1263,69 @@ public class SpecificService {
|
|
|
i.setCompare(0);
|
|
|
}
|
|
|
});
|
|
|
- return resultList;
|
|
|
+ List<SpecificTarget> resultendList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
|
|
|
+
|
|
|
+ resultList.stream().forEach(i->{
|
|
|
+ if (map.containsKey(i.getWpid())){
|
|
|
+ Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
|
|
|
+ if (!integerListMap.containsKey(i.getMonth())){
|
|
|
+ map.get(i.getWpid()).put(i.getMonth(),i);
|
|
|
+ }else {
|
|
|
+
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
|
|
|
+ tempMap.put(i.getMonth(),i);
|
|
|
+ map.put(i.getWpid(),tempMap);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ Set<String> wpids = map.keySet();
|
|
|
+ if (StringUtils.isNotNull(wpids)){
|
|
|
+ wpids.stream().forEach(wpid->{
|
|
|
+ SpecificTarget vo = new SpecificTarget();
|
|
|
+ vo.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ List<SpecificTargetVo> tempList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
|
|
|
+ for(int x = 1;x<=12;x++){
|
|
|
+ if (listMap.containsKey(x)){
|
|
|
+ tempList.add(listMap.get(x));
|
|
|
+ }else {
|
|
|
+ SpecificTargetVo vo1 = new SpecificTargetVo();
|
|
|
+ vo1.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ vo1.setYear(Integer.parseInt(year));
|
|
|
+ vo1.setMonth(x);
|
|
|
+ tempList.add(vo1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ vo.setTargetList(tempList);
|
|
|
+ resultendList.add(vo);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return resultendList;
|
|
|
}
|
|
|
|
|
|
- public List<SpecificTargetVo> xdsslList(String companys, String type, String year) {
|
|
|
+ public List<SpecificTarget> xdsslList(String companys, String type, String year) {
|
|
|
//获取年份所有当月的数据
|
|
|
QueryWrapper<ProEconPowerstationInfoDay1> currentqw = new QueryWrapper<>();
|
|
|
currentqw.select("foreign_key_id,max(record_date) record_date,max(yxdtjssdl) yxdtjssdl,max(yxdjclssdl) yxdjclssdl,max(yllfdl) yllfdl");
|
|
@@ -1109,10 +1406,69 @@ public class SpecificService {
|
|
|
i.setCompare(0);
|
|
|
}
|
|
|
});
|
|
|
- return resultList;
|
|
|
+ List<SpecificTarget> resultendList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
|
|
|
+
|
|
|
+ resultList.stream().forEach(i->{
|
|
|
+ if (map.containsKey(i.getWpid())){
|
|
|
+ Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
|
|
|
+ if (!integerListMap.containsKey(i.getMonth())){
|
|
|
+ map.get(i.getWpid()).put(i.getMonth(),i);
|
|
|
+ }else {
|
|
|
+
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
|
|
|
+ tempMap.put(i.getMonth(),i);
|
|
|
+ map.put(i.getWpid(),tempMap);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ Set<String> wpids = map.keySet();
|
|
|
+ if (StringUtils.isNotNull(wpids)){
|
|
|
+ wpids.stream().forEach(wpid->{
|
|
|
+ SpecificTarget vo = new SpecificTarget();
|
|
|
+ vo.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ List<SpecificTargetVo> tempList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
|
|
|
+ for(int x = 1;x<=12;x++){
|
|
|
+ if (listMap.containsKey(x)){
|
|
|
+ tempList.add(listMap.get(x));
|
|
|
+ }else {
|
|
|
+ SpecificTargetVo vo1 = new SpecificTargetVo();
|
|
|
+ vo1.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ vo1.setYear(Integer.parseInt(year));
|
|
|
+ vo1.setMonth(x);
|
|
|
+ tempList.add(vo1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ vo.setTargetList(tempList);
|
|
|
+ resultendList.add(vo);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return resultendList;
|
|
|
}
|
|
|
|
|
|
- public List<SpecificTargetVo> xnsslList(String companys, String type, String year) {
|
|
|
+ public List<SpecificTarget> xnsslList(String companys, String type, String year) {
|
|
|
//获取年份所有当月的数据
|
|
|
QueryWrapper<ProEconPowerstationInfoDay1> currentqw = new QueryWrapper<>();
|
|
|
currentqw.select("foreign_key_id,max(record_date) record_date,max(ydjssdl) ydjssdl,max(yqxjclssdl) yqxjclssdl,max(ysdtjssdl) ysdtjssdl,max(yxnssdl) yxnssdl,max(yllfdl) yllfdl");
|
|
@@ -1193,10 +1549,69 @@ public class SpecificService {
|
|
|
i.setCompare(0);
|
|
|
}
|
|
|
});
|
|
|
- return resultList;
|
|
|
+ List<SpecificTarget> resultendList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
|
|
|
+
|
|
|
+ resultList.stream().forEach(i->{
|
|
|
+ if (map.containsKey(i.getWpid())){
|
|
|
+ Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
|
|
|
+ if (!integerListMap.containsKey(i.getMonth())){
|
|
|
+ map.get(i.getWpid()).put(i.getMonth(),i);
|
|
|
+ }else {
|
|
|
+
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
|
|
|
+ tempMap.put(i.getMonth(),i);
|
|
|
+ map.put(i.getWpid(),tempMap);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ Set<String> wpids = map.keySet();
|
|
|
+ if (StringUtils.isNotNull(wpids)){
|
|
|
+ wpids.stream().forEach(wpid->{
|
|
|
+ SpecificTarget vo = new SpecificTarget();
|
|
|
+ vo.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ List<SpecificTargetVo> tempList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
|
|
|
+ for(int x = 1;x<=12;x++){
|
|
|
+ if (listMap.containsKey(x)){
|
|
|
+ tempList.add(listMap.get(x));
|
|
|
+ }else {
|
|
|
+ SpecificTargetVo vo1 = new SpecificTargetVo();
|
|
|
+ vo1.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ vo1.setYear(Integer.parseInt(year));
|
|
|
+ vo1.setMonth(x);
|
|
|
+ tempList.add(vo1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ vo.setTargetList(tempList);
|
|
|
+ resultendList.add(vo);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return resultendList;
|
|
|
}
|
|
|
|
|
|
- public List<SpecificTargetVo> slsslList(String companys, String type, String year) {
|
|
|
+ public List<SpecificTarget> slsslList(String companys, String type, String year) {
|
|
|
//获取年份所有当月的数据
|
|
|
QueryWrapper<ProEconPowerstationInfoDay1> currentqw = new QueryWrapper<>();
|
|
|
currentqw.select("foreign_key_id,max(record_date) record_date,max(ycwsldwssdl) ycwsldwssdl,max(ycwsltqssdl) ycwsltqssdl,max(yllfdl) yllfdl");
|
|
@@ -1277,10 +1692,69 @@ public class SpecificService {
|
|
|
i.setCompare(0);
|
|
|
}
|
|
|
});
|
|
|
- return resultList;
|
|
|
+ List<SpecificTarget> resultendList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
|
|
|
+
|
|
|
+ resultList.stream().forEach(i->{
|
|
|
+ if (map.containsKey(i.getWpid())){
|
|
|
+ Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
|
|
|
+ if (!integerListMap.containsKey(i.getMonth())){
|
|
|
+ map.get(i.getWpid()).put(i.getMonth(),i);
|
|
|
+ }else {
|
|
|
+
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
|
|
|
+ tempMap.put(i.getMonth(),i);
|
|
|
+ map.put(i.getWpid(),tempMap);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ Set<String> wpids = map.keySet();
|
|
|
+ if (StringUtils.isNotNull(wpids)){
|
|
|
+ wpids.stream().forEach(wpid->{
|
|
|
+ SpecificTarget vo = new SpecificTarget();
|
|
|
+ vo.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ List<SpecificTargetVo> tempList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
|
|
|
+ for(int x = 1;x<=12;x++){
|
|
|
+ if (listMap.containsKey(x)){
|
|
|
+ tempList.add(listMap.get(x));
|
|
|
+ }else {
|
|
|
+ SpecificTargetVo vo1 = new SpecificTargetVo();
|
|
|
+ vo1.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ vo1.setYear(Integer.parseInt(year));
|
|
|
+ vo1.setMonth(x);
|
|
|
+ tempList.add(vo1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ vo.setTargetList(tempList);
|
|
|
+ resultendList.add(vo);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return resultendList;
|
|
|
}
|
|
|
|
|
|
- public List<SpecificTargetVo> fwjslList(String companys, String type, String year) {
|
|
|
+ public List<SpecificTarget> fwjslList(String companys, String type, String year) {
|
|
|
//获取年份所有当月的数据
|
|
|
QueryWrapper<ProEconPowerstationInfoDay4> currentqw = new QueryWrapper<>();
|
|
|
currentqw.select("foreign_key_id,max(record_date) record_date,avg(yfwjsl) yfwjsl");
|
|
@@ -1361,10 +1835,69 @@ public class SpecificService {
|
|
|
i.setCompare(0);
|
|
|
}
|
|
|
});
|
|
|
- return resultList;
|
|
|
+ List<SpecificTarget> resultendList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
|
|
|
+
|
|
|
+ resultList.stream().forEach(i->{
|
|
|
+ if (map.containsKey(i.getWpid())){
|
|
|
+ Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
|
|
|
+ if (!integerListMap.containsKey(i.getMonth())){
|
|
|
+ map.get(i.getWpid()).put(i.getMonth(),i);
|
|
|
+ }else {
|
|
|
+
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
|
|
|
+ tempMap.put(i.getMonth(),i);
|
|
|
+ map.put(i.getWpid(),tempMap);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ Set<String> wpids = map.keySet();
|
|
|
+ if (StringUtils.isNotNull(wpids)){
|
|
|
+ wpids.stream().forEach(wpid->{
|
|
|
+ SpecificTarget vo = new SpecificTarget();
|
|
|
+ vo.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ List<SpecificTargetVo> tempList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
|
|
|
+ for(int x = 1;x<=12;x++){
|
|
|
+ if (listMap.containsKey(x)){
|
|
|
+ tempList.add(listMap.get(x));
|
|
|
+ }else {
|
|
|
+ SpecificTargetVo vo1 = new SpecificTargetVo();
|
|
|
+ vo1.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ vo1.setYear(Integer.parseInt(year));
|
|
|
+ vo1.setMonth(x);
|
|
|
+ tempList.add(vo1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ vo.setTargetList(tempList);
|
|
|
+ resultendList.add(vo);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return resultendList;
|
|
|
}
|
|
|
|
|
|
- public List<SpecificTargetVo> ztzhlList(String companys, String type, String year) {
|
|
|
+ public List<SpecificTarget> ztzhlList(String companys, String type, String year) {
|
|
|
//获取年份所有当月的数据
|
|
|
QueryWrapper<ProEconPowerstationInfoDay4> currentqw = new QueryWrapper<>();
|
|
|
currentqw.select("foreign_key_id,max(record_date) record_date,avg(yztzhjsl) yztzhjsl");
|
|
@@ -1445,10 +1978,69 @@ public class SpecificService {
|
|
|
i.setCompare(0);
|
|
|
}
|
|
|
});
|
|
|
- return resultList;
|
|
|
+ List<SpecificTarget> resultendList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
|
|
|
+
|
|
|
+ resultList.stream().forEach(i->{
|
|
|
+ if (map.containsKey(i.getWpid())){
|
|
|
+ Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
|
|
|
+ if (!integerListMap.containsKey(i.getMonth())){
|
|
|
+ map.get(i.getWpid()).put(i.getMonth(),i);
|
|
|
+ }else {
|
|
|
+
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
|
|
|
+ tempMap.put(i.getMonth(),i);
|
|
|
+ map.put(i.getWpid(),tempMap);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ Set<String> wpids = map.keySet();
|
|
|
+ if (StringUtils.isNotNull(wpids)){
|
|
|
+ wpids.stream().forEach(wpid->{
|
|
|
+ SpecificTarget vo = new SpecificTarget();
|
|
|
+ vo.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ List<SpecificTargetVo> tempList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
|
|
|
+ for(int x = 1;x<=12;x++){
|
|
|
+ if (listMap.containsKey(x)){
|
|
|
+ tempList.add(listMap.get(x));
|
|
|
+ }else {
|
|
|
+ SpecificTargetVo vo1 = new SpecificTargetVo();
|
|
|
+ vo1.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ vo1.setYear(Integer.parseInt(year));
|
|
|
+ vo1.setMonth(x);
|
|
|
+ tempList.add(vo1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ vo.setTargetList(tempList);
|
|
|
+ resultendList.add(vo);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return resultendList;
|
|
|
}
|
|
|
|
|
|
- public List<SpecificTargetVo> xqjslList(String companys, String type, String year) {
|
|
|
+ public List<SpecificTarget> xqjslList(String companys, String type, String year) {
|
|
|
//获取年份所有当月的数据
|
|
|
QueryWrapper<ProEconPowerstationInfoDay4> currentqw = new QueryWrapper<>();
|
|
|
currentqw.select("foreign_key_id,max(record_date) record_date,avg(ygzxqjsl) ygzxqjsl");
|
|
@@ -1529,10 +2121,69 @@ public class SpecificService {
|
|
|
i.setCompare(0);
|
|
|
}
|
|
|
});
|
|
|
- return resultList;
|
|
|
+ List<SpecificTarget> resultendList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
|
|
|
+
|
|
|
+ resultList.stream().forEach(i->{
|
|
|
+ if (map.containsKey(i.getWpid())){
|
|
|
+ Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
|
|
|
+ if (!integerListMap.containsKey(i.getMonth())){
|
|
|
+ map.get(i.getWpid()).put(i.getMonth(),i);
|
|
|
+ }else {
|
|
|
+
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
|
|
|
+ tempMap.put(i.getMonth(),i);
|
|
|
+ map.put(i.getWpid(),tempMap);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ Set<String> wpids = map.keySet();
|
|
|
+ if (StringUtils.isNotNull(wpids)){
|
|
|
+ wpids.stream().forEach(wpid->{
|
|
|
+ SpecificTarget vo = new SpecificTarget();
|
|
|
+ vo.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ List<SpecificTargetVo> tempList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
|
|
|
+ for(int x = 1;x<=12;x++){
|
|
|
+ if (listMap.containsKey(x)){
|
|
|
+ tempList.add(listMap.get(x));
|
|
|
+ }else {
|
|
|
+ SpecificTargetVo vo1 = new SpecificTargetVo();
|
|
|
+ vo1.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ vo1.setYear(Integer.parseInt(year));
|
|
|
+ vo1.setMonth(x);
|
|
|
+ tempList.add(vo1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ vo.setTargetList(tempList);
|
|
|
+ resultendList.add(vo);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return resultendList;
|
|
|
}
|
|
|
|
|
|
- public List<SpecificTargetVo> mtbfList(String companys, String type, String year) {
|
|
|
+ public List<SpecificTarget> mtbfList(String companys, String type, String year) {
|
|
|
|
|
|
//获取年份所有当月的数据
|
|
|
QueryWrapper<ProEconPowerstationInfoDay4> currentqw = new QueryWrapper<>();
|
|
@@ -1614,10 +2265,69 @@ public class SpecificService {
|
|
|
i.setCompare(0);
|
|
|
}
|
|
|
});
|
|
|
- return resultList;
|
|
|
+ List<SpecificTarget> resultendList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
|
|
|
+
|
|
|
+ resultList.stream().forEach(i->{
|
|
|
+ if (map.containsKey(i.getWpid())){
|
|
|
+ Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
|
|
|
+ if (!integerListMap.containsKey(i.getMonth())){
|
|
|
+ map.get(i.getWpid()).put(i.getMonth(),i);
|
|
|
+ }else {
|
|
|
+
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
|
|
|
+ tempMap.put(i.getMonth(),i);
|
|
|
+ map.put(i.getWpid(),tempMap);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ Set<String> wpids = map.keySet();
|
|
|
+ if (StringUtils.isNotNull(wpids)){
|
|
|
+ wpids.stream().forEach(wpid->{
|
|
|
+ SpecificTarget vo = new SpecificTarget();
|
|
|
+ vo.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ List<SpecificTargetVo> tempList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
|
|
|
+ for(int x = 1;x<=12;x++){
|
|
|
+ if (listMap.containsKey(x)){
|
|
|
+ tempList.add(listMap.get(x));
|
|
|
+ }else {
|
|
|
+ SpecificTargetVo vo1 = new SpecificTargetVo();
|
|
|
+ vo1.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ vo1.setYear(Integer.parseInt(year));
|
|
|
+ vo1.setMonth(x);
|
|
|
+ tempList.add(vo1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ vo.setTargetList(tempList);
|
|
|
+ resultendList.add(vo);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return resultendList;
|
|
|
}
|
|
|
|
|
|
- public List<SpecificTargetVo> mttrList(String companys, String type, String year) {
|
|
|
+ public List<SpecificTarget> mttrList(String companys, String type, String year) {
|
|
|
//获取年份所有当月的数据
|
|
|
QueryWrapper<ProEconPowerstationInfoDay4> currentqw = new QueryWrapper<>();
|
|
|
currentqw.select("foreign_key_id,max(record_date) record_date,max(ymttr) ymttr");
|
|
@@ -1698,7 +2408,66 @@ public class SpecificService {
|
|
|
i.setCompare(0);
|
|
|
}
|
|
|
});
|
|
|
- return resultList;
|
|
|
+ List<SpecificTarget> resultendList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<String,Map<Integer,SpecificTargetVo>> map = new HashMap<>();
|
|
|
+
|
|
|
+ resultList.stream().forEach(i->{
|
|
|
+ if (map.containsKey(i.getWpid())){
|
|
|
+ Map<Integer, SpecificTargetVo> integerListMap = map.get(i.getWpid());
|
|
|
+ if (!integerListMap.containsKey(i.getMonth())){
|
|
|
+ map.get(i.getWpid()).put(i.getMonth(),i);
|
|
|
+ }else {
|
|
|
+
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ Map<Integer,SpecificTargetVo> tempMap = new HashMap<>();
|
|
|
+ tempMap.put(i.getMonth(),i);
|
|
|
+ map.put(i.getWpid(),tempMap);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ Set<String> wpids = map.keySet();
|
|
|
+ if (StringUtils.isNotNull(wpids)){
|
|
|
+ wpids.stream().forEach(wpid->{
|
|
|
+ SpecificTarget vo = new SpecificTarget();
|
|
|
+ vo.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ List<SpecificTargetVo> tempList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<Integer, SpecificTargetVo> listMap = map.get(wpid);
|
|
|
+ for(int x = 1;x<=12;x++){
|
|
|
+ if (listMap.containsKey(x)){
|
|
|
+ tempList.add(listMap.get(x));
|
|
|
+ }else {
|
|
|
+ SpecificTargetVo vo1 = new SpecificTargetVo();
|
|
|
+ vo1.setWpid(wpid);
|
|
|
+ if(wpid.contains("_ZGS")){
|
|
|
+ vo1.setWpname(CacheContext.cpmap.get(companys).getAname());
|
|
|
+ }else if(wpid.contains("_RGN")){
|
|
|
+ vo1.setWpname(CacheContext.rgmap.get(companys).getAname());
|
|
|
+ }else{
|
|
|
+ vo1.setWpname(CacheContext.wpmap.get(wpid).getAname());
|
|
|
+ }
|
|
|
+ vo1.setYear(Integer.parseInt(year));
|
|
|
+ vo1.setMonth(x);
|
|
|
+ tempList.add(vo1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ vo.setTargetList(tempList);
|
|
|
+ resultendList.add(vo);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return resultendList;
|
|
|
}
|
|
|
|
|
|
|