| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.javaweb.cms.util.CmsConstants; |
| | | import com.javaweb.common.core.domain.AjaxResult; |
| | | import com.javaweb.common.utils.Arith; |
| | |
| | | import com.javaweb.geo.domain.Project; |
| | | import com.javaweb.geo.domain.TubLog; |
| | | import com.javaweb.geo.enums.RecordType; |
| | | import com.javaweb.geo.mapper.ProjectCameraMapper; |
| | | import com.javaweb.geo.mapper.TubLogMapper; |
| | | import com.javaweb.geo.service.IHoleMediaService; |
| | | import com.javaweb.geo.service.IHoleService; |
| | |
| | | |
| | | @Autowired |
| | | private TubLogMapper tubLogMapper; |
| | | |
| | | @Autowired |
| | | private ProjectCameraMapper projectCameraMapper; |
| | | |
| | | |
| | | private String getAdminIndex() { |
| | |
| | | List<Hole> holes = holeService.selectHoleProjectProcess(); |
| | | Map<String, Double> holeMap = new HashMap<>(); |
| | | for (Hole hole : holes) { |
| | | Double val = Arith.div(hole.getFootageCpl(), hole.getFootage(), 2); |
| | | val = Arith.round(val * 100, 2); |
| | | Double val =0.0d; |
| | | if(ObjectUtil.isNotEmpty(hole.getFootageCpl()) && ObjectUtil.isNotEmpty(hole.getFootage())) { |
| | | val = Arith.div(hole.getFootageCpl(), hole.getFootage(), 2); |
| | | val = Arith.round(val * 100, 2); |
| | | } |
| | | holeMap.put(hole.getProjectId(), val); |
| | | } |
| | | |
| | |
| | | HoleMedia holeMedia = holeMediaService.selectHoleMediaNumber(); |
| | | result.setFileCount(holeMedia.getNumber()); |
| | | |
| | | Integer cameraCount = projectCameraMapper.count(); |
| | | result.setCameraCount(cameraCount); |
| | | return AjaxResult.success("查询成功",result); |
| | | } |
| | | |
| | |
| | | @GetMapping("/system/stat/tubLogData") |
| | | public AjaxResult tubLogData() { |
| | | AjaxResult ajaxResult = new AjaxResult(); |
| | | List<TubLog> tubLogs = tubLogMapper.countTubLogDate(); |
| | | List<TubLog> tubLogs = tubLogMapper.countTubLogDate(null); |
| | | ajaxResult.put("tubLogs",tubLogs); |
| | | return ajaxResult; |
| | | } |