地质所 沉降监测网建设项目
suerwei
2024-06-22 0b8e43d5f5fd889ffcb715dafdaa6d4511532665
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/HoleController.java
@@ -130,16 +130,13 @@
    @PostMapping("/edit")
    @ResponseBody
    public AjaxResult editSave(Hole hole) {
        if(isNotNull(hole.getFootage()) &&  isNotNull(hole.getFootageCpl())){
        if(ObjectUtil.isNotEmpty(hole.getFootage()) &&  ObjectUtil.isNotEmpty(hole.getFootageCpl())){
            Double rate = Arith.div(hole.getFootageCpl(),hole.getFootage(),2) ;
            hole.setRate(rate);
        }
        return toAjax(holeService.updateHole(hole));
    }
    private boolean isNotNull(Double val){
        return val !=null && val !=0.0D;
    }
    /**
     * 删除钻孔