| | |
| | | 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; |
| | |
| | | List<Hole> holes = holeService.selectHoleProjectProcess(); |
| | | Map<String, Double> holeMap = new HashMap<>(); |
| | | for (Hole hole : holes) { |
| | | Double val = Arith.div(hole.getFootageCpl(), hole.getFootage(), 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); |
| | | } |
| | | |
| | |
| | | @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; |
| | | } |
| | | |
| | | /** |
| | | * 删除钻孔 |
| | |
| | | exportUrl: prefix + "/export", |
| | | importUrl: prefix + "/importHole/"+projectId, |
| | | modalName: "钻孔", |
| | | pageSize:50, |
| | | columns: [{ |
| | | checkbox: true |
| | | }, |
| | |
| | | <div slot="header" class="clearfix"> |
| | | <span>钻孔进度</span> |
| | | </div> |
| | | <div style="height: 250px;"> |
| | | <template> |
| | | <el-table :data="holeData" size="small" style="width: 100%"> |
| | | <el-table :data="holeData" size="small" style="width: 100%" height="250"> |
| | | <el-table-column prop="code" label="编号"></el-table-column> |
| | | <el-table-column prop="type" label="类型"></el-table-column> |
| | | <el-table-column prop="footage" label="总进尺(m)"></el-table-column> |
| | |
| | | </el-table> |
| | | </template> |
| | | |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | |
| | |
| | | <div style="width:100%"> |
| | | <div class="input-container" style="margin-top:124px;position:relative;"> |
| | | <img src="images/loginPage/user1.png" style="margin-right:5px;"/> |
| | | <input id="username" name="username" class="txt" value="admin" type="text" autocomplete="off" placeholder="请输入用户名/邮箱" > |
| | | <input id="username" name="username" class="txt" value="" type="text" autocomplete="off" placeholder="请输入用户名/邮箱" > |
| | | <div class="error-tip"></div> |
| | | </div> |
| | | <div class="login-input input-container" style="margin-top:42px;position:relative;"> |
| | | <img class="password-icon" src="images/loginPage/password1.png"style="margin-top:-5px"/> |
| | | <input name="password" id="password" value="admin123" class="txt" type="password" placeholder="请输入登录密码" autocomplete="off" > |
| | | <input name="password" id="password" value="" class="txt" type="password" placeholder="请输入登录密码" autocomplete="off" > |
| | | <div class="error-tip"></div> |
| | | </div> |
| | | |