| | |
| | | import com.ruoyi.device.camera.mapper.ArdCamerasMapper; |
| | | import com.ruoyi.device.radar.domain.ArdEquipRadar; |
| | | import com.ruoyi.device.radar.mapper.ArdEquipRadarMapper; |
| | | import com.ruoyi.statistical.domain.PumpStatus; |
| | | import com.ruoyi.statistical.mapper.PumpStatusMapper; |
| | | import com.ruoyi.statistical.param.ESParam; |
| | | import com.ruoyi.statistical.param.Para; |
| | | import com.ruoyi.statistical.service.StatisticalService; |
| | |
| | | private ArdEquipRadarMapper radarMapper; |
| | | @Autowired |
| | | private ArdCamerasMapper camerasMapper; |
| | | @Autowired |
| | | private PumpStatusMapper pumpStatusMapper; |
| | | |
| | | |
| | | @Override |
| | |
| | | return moveMapper.ten(); |
| | | } |
| | | |
| | | public List<CountVo> es(List<CountVo> list){ |
| | | for (int i = 1; i <= 12 ; i++) { |
| | | String month; |
| | | if(i<=10){ |
| | | month = "0"+i; |
| | | }else { |
| | | month = String.valueOf(i); |
| | | } |
| | | Boolean bo = false; |
| | | for (int j = 0; j < list.size(); j++) { |
| | | CountVo countVo = list.get(j); |
| | | String mon = countVo.getDate(); |
| | | if(mon.equals(month)){ |
| | | bo = true; |
| | | } |
| | | } |
| | | if(!bo){ |
| | | CountVo countVo = new CountVo(); |
| | | countVo.setDate(month); |
| | | countVo.setCount(0); |
| | | list.add(countVo); |
| | | } |
| | | } |
| | | @Override |
| | | public List<TenVo> pump() { |
| | | List<TenVo> list = new ArrayList<>(); |
| | | QueryWrapper<PumpStatus> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("alarm_type","运行"); |
| | | int y = pumpStatusMapper.selectCount(queryWrapper); |
| | | TenVo tenVo = new TenVo(); |
| | | tenVo.setName("运行"); |
| | | tenVo.setValue(y); |
| | | list.add(tenVo); |
| | | QueryWrapper<PumpStatus> queryWrapper1 = new QueryWrapper<>(); |
| | | queryWrapper1.eq("alarm_type","停机"); |
| | | int t = pumpStatusMapper.selectCount(queryWrapper1); |
| | | TenVo tenVo1 = new TenVo(); |
| | | tenVo1.setName("停机"); |
| | | tenVo1.setValue(t); |
| | | list.add(tenVo1); |
| | | return list; |
| | | } |
| | | |
| | | public List<CountVo> esMonth(List<CountVo> list,String end){ |
| | | Integer day = Integer.valueOf(end.substring(end.length() - 2)); |
| | | for (int i = 1; i <= day ; i++) { |
| | | String d; |
| | | if(i<=10){ |
| | | d = "0"+i; |
| | | }else { |
| | | d = String.valueOf(i); |
| | | } |
| | | public List<CountVo> es(List<CountVo> list){ |
| | | List<CountVo> countVoList = new ArrayList<>(); |
| | | for (int i = 1; i <= 12 ; i++) { |
| | | CountVo vo = new CountVo(); |
| | | String month = i + "月"; |
| | | Boolean bo = false; |
| | | for (int j = 0; j < list.size(); j++) { |
| | | CountVo countVo = list.get(j); |
| | | String mon = countVo.getDate(); |
| | | if(mon.equals(d)){ |
| | | String mon = Integer.valueOf(countVo.getDate()) + "月"; |
| | | if(mon.equals(month)){ |
| | | bo = true; |
| | | vo.setDate(mon); |
| | | vo.setCount(countVo.getCount()); |
| | | } |
| | | } |
| | | if(!bo){ |
| | | CountVo countVo = new CountVo(); |
| | | countVo.setDate(d); |
| | | countVo.setCount(0); |
| | | list.add(countVo); |
| | | vo.setDate(month); |
| | | vo.setCount(0); |
| | | } |
| | | countVoList.add(vo); |
| | | } |
| | | return list; |
| | | return countVoList; |
| | | } |
| | | |
| | | public List<CountVo> esMonth(List<CountVo> list,String end){ |
| | | List<CountVo> countVoList = new ArrayList<>(); |
| | | Integer day = Integer.valueOf(end.substring(end.length() - 2)); |
| | | String month = end.substring(5,7); |
| | | for (int i = 1; i <= day ; i++) { |
| | | CountVo vo = new CountVo(); |
| | | String d = month + "月" + i + "日"; |
| | | Boolean bo = false; |
| | | for (int j = 0; j < list.size(); j++) { |
| | | CountVo countVo = list.get(j); |
| | | String mon = month + "月" + Integer.valueOf(countVo.getDate()) + "日"; |
| | | if(mon.equals(d)){ |
| | | bo = true; |
| | | vo.setDate(mon); |
| | | vo.setCount(countVo.getCount()); |
| | | } |
| | | } |
| | | if(!bo){ |
| | | vo.setDate(d); |
| | | vo.setCount(0); |
| | | } |
| | | countVoList.add(vo); |
| | | } |
| | | return countVoList; |
| | | } |
| | | } |