|
@@ -8,11 +8,14 @@ import com.gyee.frame.mapper.auto.Windturbineinfodaytop3Mapper;
|
|
|
import com.gyee.frame.model.auto.Windturbineinfodaytop3;
|
|
|
import com.gyee.frame.model.auto.Windturbineinfodaytop3Example;
|
|
|
import com.gyee.frame.model.custom.Tablepar;
|
|
|
-
|
|
|
+import com.gyee.frame.model.custom.ValueVo;
|
|
|
+import com.gyee.frame.util.DateUtils;
|
|
|
import com.gyee.frame.util.StringUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -127,6 +130,220 @@ public class Windturbineinfodaytop3Service implements BaseService<Windturbineinf
|
|
|
}
|
|
|
|
|
|
|
|
|
+ public PageInfo<Windturbineinfodaytop3> gadaylistByPage(Tablepar tablepar,String wpId, Date recorddate) {
|
|
|
+ List<Windturbineinfodaytop3> list=null;
|
|
|
+
|
|
|
+ Windturbineinfodaytop3Example example=new Windturbineinfodaytop3Example();
|
|
|
+ example.setOrderByClause("windturbineid ASC");
|
|
|
+
|
|
|
+ PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
|
|
|
+
|
|
|
+ if(recorddate!=null && StringUtils.isNotEmpty(wpId)){
|
|
|
+
|
|
|
+
|
|
|
+ example.createCriteria().andWindpowerstationidEqualTo(wpId).andTypeEqualTo(1).andRecorddateGreaterThanOrEqualTo(recorddate).andRecorddateLessThan(DateUtils.addDays(recorddate,1));
|
|
|
+ list= windturbineinfodaytop3Mapper.selectByExample(example);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ list=new ArrayList<>();
|
|
|
+ }
|
|
|
+ PageInfo<Windturbineinfodaytop3> pageInfo = new PageInfo<Windturbineinfodaytop3>(list);
|
|
|
+
|
|
|
+ return pageInfo;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public PageInfo<Windturbineinfodaytop3> gamonthlistByPage(Tablepar tablepar,String wpId, String year,String month) {
|
|
|
+ List<Windturbineinfodaytop3> list=null;
|
|
|
+
|
|
|
+ Windturbineinfodaytop3Example example=new Windturbineinfodaytop3Example();
|
|
|
+ example.setOrderByClause("windturbineid ASC");
|
|
|
+
|
|
|
+ PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
|
|
|
+
|
|
|
+ if(StringUtils.isNotEmpty(year) && StringUtils.isNotEmpty(month) && StringUtils.isNotEmpty(wpId)){
|
|
|
+
|
|
|
+
|
|
|
+ example.createCriteria().andWindpowerstationidEqualTo(wpId).andTypeEqualTo(2).andYearEqualTo(Integer.valueOf(year)).andMonthEqualTo(Integer.valueOf(month));
|
|
|
+ list= windturbineinfodaytop3Mapper.selectByExample(example);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ list=new ArrayList<>();
|
|
|
+ }
|
|
|
+ PageInfo<Windturbineinfodaytop3> pageInfo = new PageInfo<Windturbineinfodaytop3>(list);
|
|
|
+
|
|
|
+ return pageInfo;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public PageInfo<Windturbineinfodaytop3> gayearlistByPage(Tablepar tablepar,String wpId,String year) {
|
|
|
+ List<Windturbineinfodaytop3> list=null;
|
|
|
+
|
|
|
+ Windturbineinfodaytop3Example example=new Windturbineinfodaytop3Example();
|
|
|
+ example.setOrderByClause("windturbineid ASC");
|
|
|
+
|
|
|
+ PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
|
|
|
+
|
|
|
+ if(StringUtils.isNotEmpty(wpId) && StringUtils.isNotEmpty(year)){
|
|
|
+
|
|
|
+
|
|
|
+ example.createCriteria().andWindpowerstationidEqualTo(wpId).andTypeEqualTo(3).andYearEqualTo(Integer.valueOf(year));
|
|
|
+ list= windturbineinfodaytop3Mapper.selectByExample(example);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ list=new ArrayList<>();
|
|
|
+ }
|
|
|
+ PageInfo<Windturbineinfodaytop3> pageInfo = new PageInfo<Windturbineinfodaytop3>(list);
|
|
|
+
|
|
|
+ return pageInfo;
|
|
|
+ }
|
|
|
+ /******************************************************************************************************************/
|
|
|
+ public List<Windturbineinfodaytop3> gadaylist(String wpId, Date recorddate) {
|
|
|
+ List<Windturbineinfodaytop3> list=null;
|
|
|
+
|
|
|
+ Windturbineinfodaytop3Example example=new Windturbineinfodaytop3Example();
|
|
|
+ example.setOrderByClause("windturbineid ASC");
|
|
|
+
|
|
|
+ if(recorddate!=null && StringUtils.isNotEmpty(wpId)){
|
|
|
+
|
|
|
+
|
|
|
+ example.createCriteria().andWindpowerstationidEqualTo(wpId).andTypeEqualTo(1).andRecorddateGreaterThanOrEqualTo(recorddate).andRecorddateLessThan(DateUtils.addDays(recorddate,1));
|
|
|
+ list= windturbineinfodaytop3Mapper.selectByExample(example);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ list=new ArrayList<>();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
+ public List<Windturbineinfodaytop3> gamonthlist(String wpId, String year,String month) {
|
|
|
+ List<Windturbineinfodaytop3> list=null;
|
|
|
+
|
|
|
+ Windturbineinfodaytop3Example example=new Windturbineinfodaytop3Example();
|
|
|
+ example.setOrderByClause("windturbineid ASC");
|
|
|
+
|
|
|
+ if(StringUtils.isNotEmpty(year) && StringUtils.isNotEmpty(month) && StringUtils.isNotEmpty(wpId)){
|
|
|
+
|
|
|
+
|
|
|
+ example.createCriteria().andWindpowerstationidEqualTo(wpId).andTypeEqualTo(2).andYearEqualTo(Integer.valueOf(year)).andMonthEqualTo(Integer.valueOf(month));
|
|
|
+ list= windturbineinfodaytop3Mapper.selectByExample(example);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ list=new ArrayList<>();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
+ public List<Windturbineinfodaytop3> gayearlist(String wpId, String year) {
|
|
|
+ List<Windturbineinfodaytop3> list=null;
|
|
|
+
|
|
|
+ Windturbineinfodaytop3Example example=new Windturbineinfodaytop3Example();
|
|
|
+ example.setOrderByClause("windturbineid ASC");
|
|
|
+
|
|
|
+ if(StringUtils.isNotEmpty(wpId) && StringUtils.isNotEmpty(year)){
|
|
|
+
|
|
|
+
|
|
|
+ example.createCriteria().andWindpowerstationidEqualTo(wpId).andTypeEqualTo(3).andYearEqualTo(Integer.valueOf(year));
|
|
|
+ list= windturbineinfodaytop3Mapper.selectByExample(example);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ list=new ArrayList<>();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+ /******************************************************************************************************************/
|
|
|
+ public List<ValueVo> wtchart(String gaid) {
|
|
|
+
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(gaid)) {
|
|
|
+ List<ValueVo> vos = new ArrayList<ValueVo>();
|
|
|
+
|
|
|
+ Windturbineinfodaytop3 wtd = windturbineinfodaytop3Mapper.selectByPrimaryKey(Integer.valueOf(gaid));
|
|
|
+
|
|
|
+ for (int i = 0; i < 10; i++) {
|
|
|
+ ValueVo vo = new ValueVo();
|
|
|
+
|
|
|
+ switch (i) {
|
|
|
+ case 0:
|
|
|
+ // vo.setName("N("+winfo.getN4()+"/"+winfo.getN()+")");
|
|
|
+ vo.setName("平均切入风速");
|
|
|
+ // vo.setData1(wtd.getMonthxfqr());
|
|
|
+ vo.setData1(wtd.getYearxfqr());
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ // vo.setName("NNE("+winfo.getNne4()+"/"+winfo.getNne()+")");
|
|
|
+ vo.setName("性能损失电量");
|
|
|
+ // vo.setData1(wtd.getMonthxnssdl());
|
|
|
+ vo.setData1(wtd.getYearxnssdl());
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ // vo.setName("NE("+winfo.getNe4()+"/"+winfo.getNe()+")");
|
|
|
+ vo.setName("拟合优度");
|
|
|
+ // vo.setData1(wtd.getMonthnhyd());
|
|
|
+ vo.setData1(wtd.getYearnhyd());
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ // vo.setName("ENE("+winfo.getEne4()+"/"+winfo.getEne()+")");
|
|
|
+ vo.setName("功率一致性系数");
|
|
|
+ // vo.setData1(wtd.getMonthglyzxxs());
|
|
|
+ vo.setData1(wtd.getYearglyzxxs());
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ // vo.setName("E("+winfo.getE4()+"/"+winfo.getE()+")");
|
|
|
+ vo.setName("利用小时");
|
|
|
+ // vo.setData1(wtd.getMonthlyxs());
|
|
|
+ vo.setData1(wtd.getYearlyxs());
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ // vo.setName("ESE("+winfo.getEse()+"/"+winfo.getEse()+")");
|
|
|
+ vo.setName("设备可利用率");
|
|
|
+ // vo.setData1(wtd.getMonthsbklyl());
|
|
|
+ vo.setData1(wtd.getYearsbklyl());
|
|
|
+ break;
|
|
|
+ case 6:
|
|
|
+ // vo.setName("ESE("+winfo.getEse()+"/"+winfo.getEse()+")");
|
|
|
+ vo.setName("等效可利用系数");
|
|
|
+ // vo.setData1(wtd.getMonthdxkyxs());
|
|
|
+ vo.setData1(wtd.getYeardxkyxs());
|
|
|
+ break;
|
|
|
+ case 7:
|
|
|
+ // vo.setName("ESE("+winfo.getEse()+"/"+winfo.getEse()+")");
|
|
|
+ vo.setName("有效风时数");
|
|
|
+ // vo.setData1(wtd.getMonthyxfss());
|
|
|
+ vo.setData1(wtd.getYearyxfss());
|
|
|
+ break;
|
|
|
+ case 8:
|
|
|
+ // vo.setName("ESE("+winfo.getEse()+"/"+winfo.getEse()+")");
|
|
|
+ vo.setName("平均风速");
|
|
|
+ // vo.setData1(wtd.getMonthdxkyxs());
|
|
|
+ vo.setData1(wtd.getYeardxkyxs());
|
|
|
+ break;
|
|
|
+ case 9:
|
|
|
+ // vo.setName("ESE("+winfo.getEse()+"/"+winfo.getEse()+")");
|
|
|
+ vo.setName("静风频率");
|
|
|
+ // vo.setData1(wtd.getMonthdxkyxs());
|
|
|
+ vo.setData1(wtd.getYeardxkyxs());
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ vos.add(vo);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ return vos;
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
+ return new ArrayList<>();
|
|
|
+ }
|
|
|
|
|
|
+
|
|
|
}
|