| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDateTime; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | if(list==null|| list.isEmpty()){ |
| | | return AjaxResult.success(tScreenContent); |
| | | } |
| | | BeanUtils.copyProperties( list.get(0),tScreenContent); |
| | | BeanUtils.copyProperties(list.get(0),tScreenContent); |
| | | list.remove(0); |
| | | list.forEach(x->{ |
| | | tScreenContent.setCarDischarge(tScreenContent.getCarDischarge().add(x.getCarDischarge())); |
| | |
| | | tScreenContent.setValueOne(tScreenContent.getValueOne().add(x.getValueOne())); |
| | | tScreenContent.setValueTwo(tScreenContent.getValueTwo().add(x.getValueTwo())); |
| | | tScreenContent.setValueThree(tScreenContent.getValueThree().add(x.getValueThree())); |
| | | if(tScreenContent.getStatisticalDeadline().isBefore(x.getStatisticalDeadline())) tScreenContent.setStatisticalDeadline(x.getStatisticalDeadline()); |
| | | if(tScreenContent.getStatisticalDeadline().getTime()<(x.getStatisticalDeadline().getTime())) { |
| | | tScreenContent.setStatisticalDeadline(x.getStatisticalDeadline()); |
| | | } |
| | | }); |
| | | return AjaxResult.success(tScreenContent); |
| | | } |
| | | |
| | | @ApiOperation(tags = {"车位数据传输"},value = "充电桩数据大屏") |
| | | @PostMapping(value = "/carportData") |
| | | public AjaxResult<?> carportData(Integer parkingPlace,Integer remainPlace) { |
| | | screenContentService.carportData(parkingPlace,remainPlace); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @ApiOperation(tags = {"获取车位数据传输"},value = "充电桩数据大屏") |
| | | @GetMapping(value = "/getCarportData") |
| | | public AjaxResult<?> getCarportData() { |
| | | HashMap<String,Object> map = screenContentService.getCarportData(); |
| | | return AjaxResult.success(map); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 数据回显 站点id |
| | | */ |