package com.gyee.generation.service;//package com.gyee.generation.service; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.gyee.common.contant.ContantXk; import com.gyee.common.model.PointData; import com.gyee.common.model.StringUtils; import com.gyee.generation.init.CacheContext; import com.gyee.generation.model.auto.ProBasicEquipment; import com.gyee.generation.model.auto.ProBasicEquipmentPoint; import com.gyee.generation.model.auto.ProEconEquipmentInfoDay3; import com.gyee.generation.service.auto.IProEconEquipmentInfoDay3Service; import com.gyee.generation.task.thread.EquipmentInfo3Thread; import com.gyee.generation.util.DateUtils; import com.gyee.generation.util.realtimesource.IEdosUtil; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.*; import java.util.concurrent.CountDownLatch; import java.util.concurrent.Executor; import java.util.stream.Collectors; @Service public class EquipmentInfo3Service { // private static final Logger logger = LoggerFactory.getLogger(WindPowerInfo2Service.class); @Resource private IEdosUtil edosUtil; @Resource private IProEconEquipmentInfoDay3Service proEconEquipmentInfoDay3Service; @Resource private Executor executor; /** * 计算设备日信息 */ public void calEquipmentInfoDay(Date recordDate) throws Exception { Calendar c=Calendar.getInstance(); c.setTime(recordDate); Date end=c.getTime(); Date begin= DateUtils.truncate(c.getTime()); //判断是否有重复记录,先删除重复记录 QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("record_date",recordDate); List idls = proEconEquipmentInfoDay3Service.list(queryWrapper).stream() .map(ProEconEquipmentInfoDay3::getId) .collect(Collectors.toList()); // if (idls.size() > 0) { // // proEconEquipmentInfoDay3Service.removeByIds(idls); // // } List tempids=new ArrayList<>(); for(int i=0;i(); } } if(!tempids.isEmpty()) { proEconEquipmentInfoDay3Service.removeByIds(tempids); } Map pep3map=new HashMap<>(); Calendar cl=Calendar.getInstance(); cl.setTime(recordDate); cl.add(Calendar.DAY_OF_MONTH,-1); if(cl.get(Calendar.DAY_OF_MONTH)!=1) { QueryWrapper queryWrapper2 = new QueryWrapper<>(); queryWrapper2.eq("record_date",cl.getTime()); List pep3ls = proEconEquipmentInfoDay3Service.list(queryWrapper2); if(!pep3ls.isEmpty()) { for(ProEconEquipmentInfoDay3 pep:pep3ls) { pep3map.put(pep.getWindturbineId(),pep); } } } List dayls=new ArrayList<>(); final CountDownLatch latch = new CountDownLatch(+CacheContext.wtls.size()); for(ProBasicEquipment wt:CacheContext.wtls) { // if(CacheContext.wtpAimap.containsKey(wt.getId())) // { // // // ProEconEquipmentInfoDay3 pewp=new ProEconEquipmentInfoDay3(); // Initial.initial(pewp); // pewp.setCompanyId(wt.getCompanyId()); // pewp.setWindpowerstationId(wt.getWindpowerstationId()); // pewp.setLineId(wt.getLineId()); // pewp.setProjectId(wt.getProjectId()); // pewp.setRegionId(wt.getRegionId()); // pewp.setRecordDate(DateUtils.truncate(recordDate)); // pewp.setWindturbineId(wt.getId()); // //昨日的统计结果 // List pepidls =new ArrayList<>(); //// Calendar cl=Calendar.getInstance(); //// cl.setTime(recordDate); //// cl.add(Calendar.DAY_OF_MONTH,-1); //// if(cl.get(Calendar.DAY_OF_MONTH)!=1) //// //// { //// QueryWrapper queryWrapper2 = new QueryWrapper<>(); //// queryWrapper2.eq("record_date",cl.getTime()) //// .eq("windturbine_Id",wt.getId()); //// pepidls = proEconEquipmentInfoDay3Service.list(queryWrapper2); ////// .stream() ////// .filter(i -> i.getRecordDate().compareTo(DateUtils.truncate(cl.getTime())) == 0 ////// && i.getWindturbineId().equals(wt.getId()) ////// ) ////// .collect(Collectors.toList()); //// } // // if(pep3map.containsKey(wt.getId())) // { // pepidls.add(pep3map.get(wt.getId())); // } // calDetiall( pewp, end, begin,wt,pepidls); // calSimple( pewp, end, begin, wt,pepidls); // dayls.add(pewp); // // proEconEquipmentInfoDay3Service.save(pewp); // // // } new Thread(new EquipmentInfo3Thread(executor, wt, pep3map, recordDate, end, begin,dayls, edosUtil,latch)).start(); } latch.await(); List templs=new ArrayList<>(); for(ProEconEquipmentInfoDay3 vo:dayls) { if(StringUtils.notEmp(vo) && StringUtils.notEmp(vo.getWindturbineId())) { templs.add(vo); if(templs.size()==100) { proEconEquipmentInfoDay3Service.saveBatch(templs); templs=new ArrayList<>(); } } } if(!templs.isEmpty()) { proEconEquipmentInfoDay3Service.saveBatch(templs); } // proEconEquipmentInfoDay3Service.saveBatch(dayls); } private void calDetiall(ProEconEquipmentInfoDay3 pewp, Date end, Date begin, ProBasicEquipment wt, List pepidls) throws Exception { // // 0 待机 // 1 手动停机 // 2 正常发电 // 3 发电降出力 // 4 故障 // 5 故障受累 // 6 检修 // 7 检修受累 // 8 限电降出力 // 9 限电停机 // 10 电网受累 // 11 环境受累 // 12 通讯中断 // 13 设备离线 double lastState;//上一分钟状态 double djcs=0;//待机时长 double sdtjcs=0;//手动停机时长 double zcfdcs=0;//正常发电时长 double fdjclcs=0;//发电降出力时长 double gzcs=0;//故障时长 double gzslcs=0;//故障受累时长 double jxcs=0;//检修时长 double jxslcs=0;//检修受累时长 double xdjclcs=0;//限电降出力时长 double xdtjcs=0;//限电停机时长 double dwslcs=0;//电网受累时长 double hjslcs=0;//环境受累时长 double txzdcs=0;//通讯中断时长 double sblxcs=0;//设备离线时长 Map> wtpAimap = CacheContext.wtpAimap; lastState=-1;//上一分钟状态 Map aimap=wtpAimap.get(wt.getId()); if(aimap.containsKey(ContantXk.MXZT)) { ProBasicEquipmentPoint point=aimap.get(ContantXk.MXZT); //按照分钟时间进行统计状态快照值 List pointls=edosUtil.getHistoryDatasSnap(point.getNemCode(), begin.getTime()/1000, end.getTime()/1000); if(!pointls.isEmpty()) { for(PointData po :pointls) { if(po.getPointValueInDouble()==0) { if(lastState!=po.getPointValueInDouble()) { //将当前状态保存到上一分钟状态 lastState=po.getPointValueInDouble(); //待机时长加1 djcs++; } }else if(po.getPointValueInDouble()==1) { if(lastState!=po.getPointValueInDouble()) { //将当前状态保存到上一分钟状态 lastState=po.getPointValueInDouble(); //手动停机时长加1 sdtjcs++; } }else if(po.getPointValueInDouble()==2) { if(lastState!=po.getPointValueInDouble()) { //将当前状态保存到上一分钟状态 lastState=po.getPointValueInDouble(); //正常发电时长加1 zcfdcs++; } }else if(po.getPointValueInDouble()==3) { if(lastState!=po.getPointValueInDouble()) { //将当前状态保存到上一分钟状态 lastState=po.getPointValueInDouble(); //发电降出力时长加1 fdjclcs++; } }else if(po.getPointValueInDouble()==4) { if(lastState!=po.getPointValueInDouble()) { //将当前状态保存到上一分钟状态 lastState=po.getPointValueInDouble(); //故障时长加1 gzcs++; } }else if(po.getPointValueInDouble()==5) { if(lastState!=po.getPointValueInDouble()) { //将当前状态保存到上一分钟状态 lastState=po.getPointValueInDouble(); //故障受累时长加1 gzslcs++; } }else if(po.getPointValueInDouble()==6) { if(lastState!=po.getPointValueInDouble()) { //将当前状态保存到上一分钟状态 lastState=po.getPointValueInDouble(); //检修时长加1 jxcs++; } }else if(po.getPointValueInDouble()==7) { if(lastState!=po.getPointValueInDouble()) { //将当前状态保存到上一分钟状态 lastState=po.getPointValueInDouble(); //检修受累时长加1 jxslcs++; } }else if(po.getPointValueInDouble()==8) { if(lastState!=po.getPointValueInDouble()) { //将当前状态保存到上一分钟状态 lastState=po.getPointValueInDouble(); //限电降出力时长加1 xdjclcs++; } }else if(po.getPointValueInDouble()==9) { if(lastState!=po.getPointValueInDouble()) { //将当前状态保存到上一分钟状态 lastState=po.getPointValueInDouble(); //限电停机时长加1 xdtjcs++; } //限电停机时长加1 xdtjcs++; }else if(po.getPointValueInDouble()==10) { if(lastState!=po.getPointValueInDouble()) { //将当前状态保存到上一分钟状态 lastState=po.getPointValueInDouble(); //电网受累时长加1 dwslcs++; } }else if(po.getPointValueInDouble()==11) { if(lastState!=po.getPointValueInDouble()) { //将当前状态保存到上一分钟状态 lastState=po.getPointValueInDouble(); //环境受累时长加1 hjslcs++; } }else if(po.getPointValueInDouble()==12) { if(lastState!=po.getPointValueInDouble()) { //将当前状态保存到上一分钟状态 lastState=po.getPointValueInDouble(); //通讯中断时长加1 txzdcs++; } }else if(po.getPointValueInDouble()==13) { if(lastState!=po.getPointValueInDouble()) { //将当前状态保存到上一分钟状态 lastState=po.getPointValueInDouble(); //设备离线时长加1 sblxcs++; } } } } } //日合计故障次数(明细) pewp.setRgzcsmx(gzcs); //日合计场内受累故障次数(明细) pewp.setRcnslgzcsmx(gzslcs); //日合计检修次数(明细) pewp.setRjxcsmx(jxcs); //日合计场内受累检修次数(明细) pewp.setRcnsljxcsmx(jxslcs); //日合计待机次数(明细) pewp.setRdjcsmx(djcs); //日合计缺陷降出力次数(明细) pewp.setRqxjclcsmx(fdjclcs); //日合计手动停机次数(明细) pewp.setRsdtjcsmx(sdtjcs); //日合计性能次数(明细) pewp.setRbwcsmx(zcfdcs); //日合计限电停机次数(明细) pewp.setRxdtjcsmx(xdtjcs); //日合计限电降出力次数(明细) pewp.setRxdjclcsmx(xdjclcs); //日合计场外受累电网次数(明细) pewp.setRcwsldwcsmx(dwslcs); //日合计场外受累电网次数(明细) pewp.setRcwsltqcsmx(hjslcs); //日合计通讯中断次数(明细) pewp.setRtxzdcsmx(txzdcs); //日合计离线次数(明细) pewp.setRlxcsmx(sblxcs); //*******************************************日信息统计*********************************************************/ //*******************************************月信息统计*********************************************************/ if(pepidls.isEmpty()) { setLossHoursMonth(pewp); }else { ProEconEquipmentInfoDay3 pepid=pepidls.get(0); //月合计故障次数(明细) pewp.setYgzcsmx(StringUtils.round(pepid.getYgzcsmx()+pewp.getRgzcsmx(),2)); //月合计场内受累故障次数(明细) pewp.setYcnslgzcsmx(StringUtils.round(pepid.getYcnslgzcsmx()+pewp.getRcnslgzcsmx(),2)); //月合计检修次数(明细) pewp.setYjxcsmx(StringUtils.round(pepid.getYjxcsmx()+pewp.getRjxcsmx(),2)); //月合计场内受累检修次数(明细) pewp.setYcnsljxcsmx(StringUtils.round( pepid.getYcnsljxcsmx()+pewp.getRcnsljxcsmx(),2)); //月合计待机次数(明细) pewp.setYdjcsmx(StringUtils.round(pepid.getYdjcsmx()+pewp.getRdjcsmx(),2)); //月合计缺陷降出力次数(明细) pewp.setYqxjclcsmx(StringUtils.round(pepid.getYqxjclcsmx()+pewp.getRqxjclcsmx(),2)); //月合计手动停机次数(明细) pewp.setYsdtjcsmx(StringUtils.round(pepid.getYsdtjcsmx()+pewp.getRsdtjcsmx(),2)); //月合计性能次数(明细) pewp.setYbwcsmx(StringUtils.round(pepid.getYbwcsmx()+pewp.getRbwcsmx(),2)); //月合计限电停机次数(明细) pewp.setYxdtjcsmx(StringUtils.round(pepid.getYxdtjcsmx()+pewp.getRxdtjcsmx(),2)); //月合计限电降出力次数(明细) pewp.setYxdjclcsmx(StringUtils.round(pepid.getYxdjclcsmx()+pewp.getRxdjclcsmx(),2)); //月合计场外受累电网次数(明细) pewp.setYcwsldwcsmx(StringUtils.round(pepid.getYcwsldwcsmx()+pewp.getRcwsldwcsmx(),2)); //月合计场外受累电网次数(明细) pewp.setYcwsltqcsmx(StringUtils.round(pepid.getYcwsltqcsmx()+pewp.getRcwsltqcsmx(),2)); //月合计通讯中断次数(明细) pewp.setYtxzdcsmx(StringUtils.round(pepid.getYtxzdcsmx()+pewp.getRtxzdcsmx(),2)); //月合计离线次数(明细) pewp.setYlxcsmx(StringUtils.round(pepid.getYlxcsmx()+pewp.getRlxcsmx(),2)); } //*******************************************月信息统计*********************************************************/ //*******************************************年信息统计*********************************************************/ if(pepidls.isEmpty()) { setLossHoursYear(pewp); }else { ProEconEquipmentInfoDay3 pepid=pepidls.get(0); //年合计故障次数(明细) pewp.setNgzcsmx(StringUtils.round(pepid.getNgzcsmx()+pewp.getRgzcsmx(),2)); //年合计场内受累故障次数(明细) pewp.setNcnslgzcsmx(StringUtils.round(pepid.getNcnslgzcsmx()+pewp.getRcnslgzcsmx(),2)); //年合计检修次数(明细) pewp.setNjxcsmx(StringUtils.round(pepid.getNjxcsmx()+pewp.getRjxcsmx(),2)); //年合计场内受累检修次数(明细) pewp.setNcnsljxcsmx(StringUtils.round( pepid.getNcnsljxcsmx()+pewp.getRcnsljxcsmx(),2)); //年合计待机次数(明细) pewp.setNdjcsmx(StringUtils.round(pepid.getNdjcsmx()+pewp.getRdjcsmx(),2)); //年合计缺陷降出力次数(明细) pewp.setNqxjclcsmx(StringUtils.round(pepid.getNqxjclcsmx()+pewp.getRqxjclcsmx(),2)); //年合计手动停机次数(明细) pewp.setNsdtjcsmx(StringUtils.round(pepid.getNsdtjcsmx()+pewp.getRsdtjcsmx(),2)); //年合计性能次数(明细) pewp.setNbwcsmx(StringUtils.round(pepid.getNbwcsmx()+pewp.getRbwcsmx(),2)); //年合计限电停机次数(明细) pewp.setNxdtjcsmx(StringUtils.round(pepid.getNxdtjcsmx()+pewp.getRxdtjcsmx(),2)); //年合计限电降出力次数(明细) pewp.setNxdjclcsmx(StringUtils.round(pepid.getNxdjclcsmx()+pewp.getRxdjclcsmx(),2)); //年合计场外受累电网次数(明细) pewp.setNcwsldwcsmx(StringUtils.round(pepid.getNcwsldwcsmx()+pewp.getRcwsldwcsmx(),2)); //年合计场外受累电网次数(明细) pewp.setNcwsltqcsmx(StringUtils.round(pepid.getNcwsltqcsmx()+pewp.getRcwsltqcsmx(),2)); //年合计通讯中断次数(明细) pewp.setNtxzdcsmx(StringUtils.round(pepid.getNtxzdcsmx()+pewp.getRtxzdcsmx(),2)); //年合计离线次数(明细) pewp.setNlxcsmx(StringUtils.round(pepid.getNlxcsmx()+pewp.getRlxcsmx(),2)); } } private static void setLossHoursYear(ProEconEquipmentInfoDay3 pewp) { //年合计故障次数(明细) pewp.setNgzcsmx(pewp.getRgzcsmx()); //年合计场内受累故障次数(明细) pewp.setNcnslgzcsmx(pewp.getRcnslgzcsmx()); //年合计检修次数(明细) pewp.setNjxcsmx(pewp.getRjxcsmx()); //年合计场内受累检修次数(明细) pewp.setNcnsljxcsmx(pewp.getRcnsljxcsmx()); //年合计待机次数(明细) pewp.setNdjcsmx(pewp.getRdjcsmx()); //年合计缺陷降出力次数(明细) pewp.setNqxjclcsmx(pewp.getRqxjclcsmx()); //年合计手动停机次数(明细) pewp.setNsdtjcsmx(pewp.getRsdtjcsmx()); //年合计性能次数(明细) pewp.setNbwcsmx(pewp.getRbwcsmx()); //年合计限电停机次数(明细) pewp.setNxdtjcsmx(pewp.getRxdtjcsmx()); //年合计限电降出力次数(明细) pewp.setNxdjclcsmx(pewp.getRxdjclcsmx()); //年合计场外受累电网次数(明细) pewp.setNcwsldwcsmx(pewp.getRcwsldwcsmx()); //年合计场外受累电网次数(明细) pewp.setNcwsltqcsmx(pewp.getRcwsltqcsmx()); //年合计通讯中断次数(明细) pewp.setNtxzdcsmx(pewp.getRtxzdcsmx()); //年合计离线次数(明细) pewp.setNlxcsmx(pewp.getRlxcsmx()); } private static void setLossHoursMonth(ProEconEquipmentInfoDay3 pewp) { //月合计故障次数(明细) pewp.setYgzcsmx(pewp.getRgzcsmx()); //月合计场内受累故障次数(明细) pewp.setYcnslgzcsmx(pewp.getRcnslgzcsmx()); //月合计检修次数(明细) pewp.setYjxcsmx(pewp.getRjxcsmx()); //月合计场内受累检修次数(明细) pewp.setYcnsljxcsmx(pewp.getRcnsljxcsmx()); //月合计待机次数(明细) pewp.setYdjcsmx(pewp.getRdjcsmx()); //月合计缺陷降出力次数(明细) pewp.setYqxjclcsmx(pewp.getRqxjclcsmx()); //月合计手动停机次数(明细) pewp.setYsdtjcsmx(pewp.getRsdtjcsmx()); //月合计性能次数(明细) pewp.setYbwcsmx(pewp.getRbwcsmx()); //月合计限电停机次数(明细) pewp.setYxdtjcsmx(pewp.getRxdtjcsmx()); //月合计限电降出力次数(明细) pewp.setYxdjclcsmx(pewp.getRxdjclcsmx()); //月合计场外受累电网次数(明细) pewp.setYcwsldwcsmx(pewp.getRcwsldwcsmx()); //月合计场外受累电网次数(明细) pewp.setYcwsltqcsmx(pewp.getRcwsltqcsmx()); //月合计通讯中断次数(明细) pewp.setYtxzdcsmx(pewp.getRtxzdcsmx()); //月合计离线次数(明细) pewp.setYlxcsmx(pewp.getRlxcsmx()); } private static void setLossHoursMonthSimple(ProEconEquipmentInfoDay3 pewp) { //月合计待机次数 pewp.setYdjcs(pewp.getRdjcs()); //月合计维护停机次数 pewp.setYjxtjcs(pewp.getRjxtjcs()); // 月合计故障停机次数 pewp.setYgztjcs(pewp.getRgztjcs()); //月合计运行次数 pewp.setYyxcs(pewp.getRyxcs()); //月合计限电次数 pewp.setYxdcs(pewp.getRxdcs()); //月合计通讯中断次数 pewp.setYtxzdcs(pewp.getRtxzdcs()); //月合计受累次数 pewp.setYslcs(pewp.getRslcs()); } private static void setLossHoursYearSimple(ProEconEquipmentInfoDay3 pewp) { //年合计待机次数 pewp.setNdjcs(pewp.getRdjcs()); //年合计维护停机次数 pewp.setNjxtjcs(pewp.getRjxtjcs()); // 年合计故障次数 pewp.setNgztjcs(pewp.getRgztjcs()); //年合计运行次数 pewp.setNyxcs(pewp.getRyxcs()); //年合计限电次数 pewp.setNxdcs(pewp.getRxdcs()); //年合计通讯中断次数 pewp.setNtxzdcs(pewp.getRtxzdcs()); //年合计受累次数 pewp.setNslcs(pewp.getRslcs()); } private void calSimple(ProEconEquipmentInfoDay3 pewp, Date end, Date begin, ProBasicEquipment wt, List pepidls) throws Exception { // 0 待机 // 1 运行 // 2 故障 // 3 检修 // 4 限电 // 5 受累 // 6 离线 //*******************************************日信息统计*********************************************************/ double lastState=-1;//上一分钟状态 double djcs=0;//待机时长 double zcfdcs=0;//正常发电时长 double gzcs=0;//故障时长 double jxcs=0;//检修时长 double xdtjcs=0;//限电停机时长 double slsc=0;//受累时长 double txzdcs=0;//通讯中断时长 Map> wtpAimap = CacheContext.wtpAimap; Map aimap=wtpAimap.get(wt.getId()); if(aimap.containsKey(ContantXk.SBZT)) { ProBasicEquipmentPoint point=aimap.get(ContantXk.SBZT); //按照分钟时间进行统计状态快照值 List pointls=edosUtil.getHistoryDatasSnap(point.getNemCode(), begin.getTime()/1000, end.getTime()/1000); if(!pointls.isEmpty()) { for (PointData po : pointls) { if (po.getPointValueInDouble() == 0) { if (lastState != po.getPointValueInDouble()) { //将当前状态保存到上一分钟状态 lastState = po.getPointValueInDouble(); //待机时长加1 djcs++; } } else if (po.getPointValueInDouble() == 1) { if (lastState != po.getPointValueInDouble()) { //将当前状态保存到上一分钟状态 lastState = po.getPointValueInDouble(); //正常发电时长加1 zcfdcs++; } } else if (po.getPointValueInDouble() == 2) { if (lastState != po.getPointValueInDouble()) { //将当前状态保存到上一分钟状态 lastState = po.getPointValueInDouble(); //故障时长加1 gzcs++; } } else if (po.getPointValueInDouble() == 3) { if (lastState != po.getPointValueInDouble()) { //将当前状态保存到上一分钟状态 lastState = po.getPointValueInDouble(); //检修时长加1 jxcs++; } } else if (po.getPointValueInDouble() == 4) { if (lastState != po.getPointValueInDouble()) { //将当前状态保存到上一分钟状态 lastState = po.getPointValueInDouble(); //限电停机时长加1 xdtjcs++; } } else if (po.getPointValueInDouble() == 5) { if (lastState != po.getPointValueInDouble()) { //将当前状态保存到上一分钟状态 lastState = po.getPointValueInDouble(); //受累时长加1 slsc++; } } else if (po.getPointValueInDouble() == 6) { if (lastState != po.getPointValueInDouble()) { //将当前状态保存到上一分钟状态 lastState = po.getPointValueInDouble(); //通讯中断时长加1 txzdcs++; } } } } } //日合计待机次数 pewp.setRdjcs(gzcs); //日合计维护停机次数 pewp.setRjxtjcs(jxcs); // 日合计待机次数 pewp.setRdjcs(djcs); //日合计运行次数 pewp.setRyxcs(zcfdcs); //日合计限电次数 pewp.setRxdcs(xdtjcs); //日合计通讯中断次数 pewp.setRtxzdcs(txzdcs); //日合计受累次数 pewp.setRslcs(slsc); //*******************************************日信息统计*********************************************************/ //*******************************************月信息统计*********************************************************/ if(pepidls.isEmpty()) { setLossHoursMonthSimple(pewp); }else { ProEconEquipmentInfoDay3 pepid=pepidls.get(0); //月合计待机次数 pewp.setYdjcs(StringUtils.round(pepid.getYdjcs()+pewp.getRdjcs(),2)); //月合计维护停机次数 pewp.setYjxtjcs(StringUtils.round(pepid.getYjxtjcs()+pewp.getRjxtjcs(),2)); // 月合计故障次数 pewp.setYgztjcs(StringUtils.round(pepid.getYgztjcs()+pewp.getRgztjcs(),2)); //月合计运行次数 pewp.setYyxcs(StringUtils.round(pepid.getYyxcs()+pewp.getRyxcs(),2)); //月合计限电次数 pewp.setYxdcs(StringUtils.round(pepid.getYxdcs()+pewp.getRxdcs(),2)); //月合计通讯中断次数 pewp.setYtxzdcs(StringUtils.round(pepid.getYtxzdcs()+pewp.getRtxzdcs(),2)); //月合计受累次数 pewp.setYslcs(StringUtils.round(pepid.getYslcs()+pewp.getRslcs(),2)); } //*******************************************月信息统计*********************************************************/ //*******************************************年信息统计*********************************************************/ if(pepidls.isEmpty()) { setLossHoursYearSimple(pewp); }else { ProEconEquipmentInfoDay3 pepid=pepidls.get(0); //年合计待机次数 pewp.setNdjcs(StringUtils.round(pepid.getNdjcs()+pewp.getRdjcs(),2)); //年合计维护停机次数 pewp.setNjxtjcs(StringUtils.round(pepid.getNjxtjcs()+pewp.getRjxtjcs(),2)); // 年合计故障次数 pewp.setNgztjcs(StringUtils.round(pepid.getNgztjcs()+pewp.getRgztjcs(),2)); //年合计运行次数 pewp.setNyxcs(StringUtils.round(pepid.getNyxcs()+pewp.getRyxcs(),2)); //年合计限电次数 pewp.setNxdcs(StringUtils.round(pepid.getNxdcs()+pewp.getRxdcs(),2)); //年合计通讯中断次数 pewp.setNtxzdcs(StringUtils.round(pepid.getNtxzdcs()+pewp.getRtxzdcs(),2)); //年合计受累次数 pewp.setNslcs(StringUtils.round(pepid.getNslcs()+pewp.getRslcs(),2)); } //*******************************************年信息统计*********************************************************/ } }