Răsfoiți Sursa

* 大屏接口

chen.cheng 4 luni în urmă
părinte
comite
06edbbdab7
14 a modificat fișierele cu 270 adăugiri și 60 ștergeri
  1. 49 22
      bd-park/park-backend/park-application/src/main/java/com/huashe/park/application/web/controller/cons/ConsPileHoleInfoController.java
  2. 22 9
      bd-park/park-backend/park-application/src/main/java/com/huashe/park/application/web/controller/cons/PileMachineInfoController.java
  3. 2 0
      bd-park/park-backend/park-collect/src/main/java/com/huashe/park/collect/event/MachineRealtimeEventListener.java
  4. 4 0
      bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/mapper/ConsPileHoleInfoMapper.java
  5. 5 0
      bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/mapper/PileMachineInfoMapper.java
  6. 3 0
      bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/service/IConsPileHoleInfoService.java
  7. 5 1
      bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/service/IPileMachineInfoService.java
  8. 6 0
      bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/service/impl/ConsPileHoleInfoServiceImpl.java
  9. 11 0
      bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/service/impl/PileMachineInfoServiceImpl.java
  10. 56 28
      bd-park/park-backend/park-core/src/main/resources/mapper/cons/ConsPileHoleInfoMapper.xml
  11. 14 0
      bd-park/park-backend/park-core/src/main/resources/mapper/cons/PileHoleIndexRealtimeMapper.xml
  12. 19 0
      bd-park/park-backend/park-core/src/main/resources/mapper/cons/PileMachineInfoMapper.xml
  13. 54 0
      bd-park/park-backend/park-domain/src/main/java/com/huashe/park/domain/dto/cons/PileRealtimeIndex.java
  14. 20 0
      bd-park/park-backend/park-domain/src/main/java/com/huashe/park/domain/entity/PileHoleIndexRealtime.java

+ 49 - 22
bd-park/park-backend/park-application/src/main/java/com/huashe/park/application/web/controller/cons/ConsPileHoleInfoController.java

@@ -1,26 +1,33 @@
 package com.huashe.park.application.web.controller.cons;
 
+import java.util.ArrayList;
 import java.util.List;
+
 import javax.servlet.http.HttpServletResponse;
 
-import com.huashe.common.domain.AjaxResult;
-import com.huashe.park.core.service.IConsPileHoleInfoService;
-import com.huashe.park.domain.entity.ConsPileHoleInfo;
-import org.springframework.security.access.prepost.PreAuthorize;
+import org.apache.commons.lang3.ObjectUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
+
+import com.huashe.common.domain.AjaxResult;
+import com.huashe.park.core.service.IConsPileHoleInfoService;
+import com.huashe.park.core.service.IMachineProcessService;
+import com.huashe.park.domain.dto.cons.PileRealtimeIndex;
+import com.huashe.park.domain.entity.ConsPileHoleInfo;
+import com.huashe.park.domain.entity.MachineProcess;
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.common.core.page.TableDataInfo;
 
 /**
  * 施工桩点信息Controller
@@ -30,31 +37,55 @@ import com.ruoyi.common.core.page.TableDataInfo;
  */
 @RestController
 @RequestMapping("/cons/pileHoleInfo")
-public class ConsPileHoleInfoController extends BaseController
-{
+public class ConsPileHoleInfoController extends BaseController {
     @Autowired
     private IConsPileHoleInfoService consPileHoleInfoService;
 
+    @Autowired
+    private IMachineProcessService machineProcessService;
+
     /**
      * 查询施工桩点信息列表
      */
     @PreAuthorize("@ss.hasPermi('cons:pileHoleInfo:list')")
     @GetMapping("/list")
-    public TableDataInfo list(ConsPileHoleInfo consPileHoleInfo)
-    {
+    public TableDataInfo list(ConsPileHoleInfo consPileHoleInfo) {
         startPage();
         List<ConsPileHoleInfo> list = consPileHoleInfoService.selectConsPileHoleInfoList(consPileHoleInfo);
         return getDataTable(list);
     }
 
+    @PreAuthorize("@ss.hasPermi('cons:pileHoleInfo:list')")
+    @GetMapping("/list/realtime/index")
+    public AjaxResult listIndex(ConsPileHoleInfo consPileHoleInfo) {
+        List<PileRealtimeIndex> pileRealtimeIndices = consPileHoleInfoService
+            .selectConsPileHoleRealtimeIndex(consPileHoleInfo);
+        return AjaxResult.success(pileRealtimeIndices);
+    }
+
+    @PreAuthorize("@ss.hasPermi('cons:pileHoleInfo:list')")
+    @GetMapping("/list/his/index")
+    public AjaxResult listHisIndex(ConsPileHoleInfo consPileHoleInfo) {
+        ConsPileHoleInfo consPileHoleInfoDb = consPileHoleInfoService
+            .selectConsPileHoleInfoById(consPileHoleInfo.getId());
+        List<MachineProcess> machineProcesses = new ArrayList<>();
+        if (ObjectUtils.isEmpty(consPileHoleInfo)) {
+            machineProcesses = machineProcessService.selectMachineProcessList(new MachineProcess() {
+                {
+                    setPileId(consPileHoleInfoDb.getByteId());
+                }
+            });
+        }
+        return AjaxResult.success(machineProcesses);
+    }
+
     /**
      * 导出施工桩点信息列表
      */
     @PreAuthorize("@ss.hasPermi('cons:pileHoleInfo:export')")
     @Log(title = "施工桩点信息", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, ConsPileHoleInfo consPileHoleInfo)
-    {
+    public void export(HttpServletResponse response, ConsPileHoleInfo consPileHoleInfo) {
         List<ConsPileHoleInfo> list = consPileHoleInfoService.selectConsPileHoleInfoList(consPileHoleInfo);
         ExcelUtil<ConsPileHoleInfo> util = new ExcelUtil<ConsPileHoleInfo>(ConsPileHoleInfo.class);
         util.exportExcel(response, list, "施工桩点信息数据");
@@ -65,8 +96,7 @@ public class ConsPileHoleInfoController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('cons:pileHoleInfo:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
         return success(consPileHoleInfoService.selectConsPileHoleInfoById(id));
     }
 
@@ -76,8 +106,7 @@ public class ConsPileHoleInfoController extends BaseController
     @PreAuthorize("@ss.hasPermi('cons:pileHoleInfo:add')")
     @Log(title = "施工桩点信息", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody ConsPileHoleInfo consPileHoleInfo)
-    {
+    public AjaxResult add(@RequestBody ConsPileHoleInfo consPileHoleInfo) {
         return toAjax(consPileHoleInfoService.insertConsPileHoleInfo(consPileHoleInfo));
     }
 
@@ -87,8 +116,7 @@ public class ConsPileHoleInfoController extends BaseController
     @PreAuthorize("@ss.hasPermi('cons:pileHoleInfo:edit')")
     @Log(title = "施工桩点信息", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody ConsPileHoleInfo consPileHoleInfo)
-    {
+    public AjaxResult edit(@RequestBody ConsPileHoleInfo consPileHoleInfo) {
         return toAjax(consPileHoleInfoService.updateConsPileHoleInfo(consPileHoleInfo));
     }
 
@@ -97,9 +125,8 @@ public class ConsPileHoleInfoController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('cons:pileHoleInfo:remove')")
     @Log(title = "施工桩点信息", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(consPileHoleInfoService.deleteConsPileHoleInfoByIds(ids));
     }
 }

+ 22 - 9
bd-park/park-backend/park-application/src/main/java/com/huashe/park/application/web/controller/cons/PileMachineInfoController.java

@@ -4,15 +4,12 @@ import java.util.List;
 
 import javax.servlet.http.HttpServletResponse;
 
-import cn.hutool.core.bean.BeanUtil;
-import com.huashe.park.domain.dto.cons.PileMachineVO;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
 import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.util.CollectionUtils;
-import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -27,6 +24,7 @@ import com.huashe.park.core.service.IConsUnitInfoService;
 import com.huashe.park.core.service.IPileMachineInfoService;
 import com.huashe.park.domain.dto.cons.MachineBiz;
 import com.huashe.park.domain.dto.cons.MachineLogin;
+import com.huashe.park.domain.dto.cons.PileMachineVO;
 import com.huashe.park.domain.entity.PileMachineInfo;
 import com.ruoyi.common.annotation.Anonymous;
 import com.ruoyi.common.annotation.Log;
@@ -36,6 +34,8 @@ import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.web.service.TokenService;
 
+import cn.hutool.core.bean.BeanUtil;
+
 /**
  * 施工桩机信息Controller
  * 
@@ -158,12 +158,25 @@ public class PileMachineInfoController extends BaseController {
     }
 
     /**
-     * 删除施工桩机信息
+     * Qry machine on offline ajax result.
+     *
+     * @return the ajax result
      */
-    @PreAuthorize("@ss.hasPermi('cons:pileMachineInfo:remove')")
-    @Log(title = "施工桩机信息", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(pileMachineInfoService.deletePileMachineInfoByIds(ids));
+    @PreAuthorize("@ss.hasPermi('cons:pileMachineInfo:list')")
+    @GetMapping("/screen/onOffline")
+    public AjaxResult qryMachineOnOffline() {
+        return AjaxResult.success(pileMachineInfoService.cntMachineOnOffline());
+    }
+
+    /**
+     * Qry machine by cons unit id ajax result.
+     *
+     * @param consUnitId the cons unit id
+     * @return the ajax result
+     */
+    @PreAuthorize("@ss.hasPermi('cons:pileMachineInfo:list')")
+    @GetMapping("/screen/consunit/machine/{consUnitId}")
+    public AjaxResult qryMachineByConsUnitId(@PathVariable("consUnitId") Long consUnitId) {
+        return AjaxResult.success(pileMachineInfoService.selectMachineByConsUnitId(consUnitId));
     }
 }

+ 2 - 0
bd-park/park-backend/park-collect/src/main/java/com/huashe/park/collect/event/MachineRealtimeEventListener.java

@@ -51,6 +51,8 @@ public class MachineRealtimeEventListener {
         pileHoleIndexRealtime.setCurrent(event.getMessage().getCurrent());
         pileHoleIndexRealtime.setDepth(event.getMessage().getPileLength());
         pileHoleIndexRealtime.setSprayPressure(event.getMessage().getSprayPressure());
+        pileHoleIndexRealtime.setTiltAngle(event.getMessage().getTiltAngle());
+        pileHoleIndexRealtime.setForwardTiltAngle(event.getMessage().getForwardTiltAngle());
         // 回带量
         pileHoleIndexRealtime.setSprayVolume(event.getMessage().getSprayVolume());
         pileHoleIndexRealtime.setVerticalDeviation(event.getMessage().getVerticalAngle());

+ 4 - 0
bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/mapper/ConsPileHoleInfoMapper.java

@@ -4,6 +4,7 @@ import java.util.List;
 
 import org.apache.ibatis.annotations.Param;
 
+import com.huashe.park.domain.dto.cons.PileRealtimeIndex;
 import com.huashe.park.domain.entity.ConsPileHoleInfo;
 
 /**
@@ -22,6 +23,7 @@ public interface ConsPileHoleInfoMapper {
     public ConsPileHoleInfo selectConsPileHoleInfoById(Long id);
 
     public ConsPileHoleInfo selectConsPileHoleInfoByByteId(String id);
+
     /**
      * 查询施工桩点信息列表
      *
@@ -30,6 +32,8 @@ public interface ConsPileHoleInfoMapper {
      */
     public List<ConsPileHoleInfo> selectConsPileHoleInfoList(ConsPileHoleInfo consPileHoleInfo);
 
+    List<PileRealtimeIndex> selectConsPileHoleRealtimeIndex(ConsPileHoleInfo consPileHoleInfo);
+
     public List<ConsPileHoleInfo> selectNonConsPileHoleInfo(ConsPileHoleInfo consPileHoleInfo);
 
     /**

+ 5 - 0
bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/mapper/PileMachineInfoMapper.java

@@ -1,5 +1,6 @@
 package com.huashe.park.core.mapper;
 
+import java.util.HashMap;
 import java.util.List;
 
 import com.huashe.park.domain.entity.PileMachineInfo;
@@ -60,4 +61,8 @@ public interface PileMachineInfoMapper {
      * @return 结果
      */
     public int deletePileMachineInfoByIds(Long[] ids);
+
+    HashMap<String, Integer> cntMachineOnOffline();
+
+    List<PileMachineInfo> selectMachineByConsUnitId(Long consUnitId);
 }

+ 3 - 0
bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/service/IConsPileHoleInfoService.java

@@ -2,6 +2,7 @@ package com.huashe.park.core.service;
 
 import java.util.List;
 
+import com.huashe.park.domain.dto.cons.PileRealtimeIndex;
 import com.huashe.park.domain.entity.ConsPileHoleInfo;
 
 /**
@@ -21,6 +22,8 @@ public interface IConsPileHoleInfoService {
 
     ConsPileHoleInfo selectConsPileHoleInfoByteId(String byteKey);
 
+    public List<PileRealtimeIndex> selectConsPileHoleRealtimeIndex(ConsPileHoleInfo consPileHoleInfo);
+
     /**
      * 查询施工桩点信息列表
      * 

+ 5 - 1
bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/service/IPileMachineInfoService.java

@@ -1,5 +1,6 @@
 package com.huashe.park.core.service;
 
+import java.util.HashMap;
 import java.util.List;
 
 import com.huashe.park.domain.dto.cons.ConsPileHoleInfoVO;
@@ -64,8 +65,11 @@ public interface IPileMachineInfoService {
      */
     int deletePileMachineInfoById(Long id);
 
-
     List<ConstUnitNode> qryMachineAssignedUnit(String machineId);
 
     List<ConsPileHoleInfoVO> machineUnitPileHole(MachineBiz machineBiz);
+
+    public HashMap<String, Integer> cntMachineOnOffline();
+
+    public List<PileMachineInfo> selectMachineByConsUnitId(Long consUnitId);
 }

+ 6 - 0
bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/service/impl/ConsPileHoleInfoServiceImpl.java

@@ -9,6 +9,7 @@ import com.huashe.park.common.EnhancedIDGenerator;
 import com.huashe.park.core.mapper.ConsPileHoleInfoMapper;
 import com.huashe.park.core.redis.RedisProxy;
 import com.huashe.park.core.service.IConsPileHoleInfoService;
+import com.huashe.park.domain.dto.cons.PileRealtimeIndex;
 import com.huashe.park.domain.entity.ConsPileHoleInfo;
 
 /**
@@ -52,6 +53,11 @@ public class ConsPileHoleInfoServiceImpl implements IConsPileHoleInfoService {
         return consPileHoleInfo;
     }
 
+    @Override
+    public List<PileRealtimeIndex> selectConsPileHoleRealtimeIndex(ConsPileHoleInfo consPileHoleInfo) {
+        return consPileHoleInfoMapper.selectConsPileHoleRealtimeIndex(consPileHoleInfo);
+    }
+
     /**
      * 查询施工桩点信息列表
      * 

+ 11 - 0
bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/service/impl/PileMachineInfoServiceImpl.java

@@ -1,6 +1,7 @@
 package com.huashe.park.core.service.impl;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.stream.Collectors;
@@ -192,6 +193,16 @@ public class PileMachineInfoServiceImpl implements IPileMachineInfoService {
         return result;
     }
 
+    @Override
+    public HashMap<String, Integer> cntMachineOnOffline() {
+        return pileMachineInfoMapper.cntMachineOnOffline();
+    }
+
+    @Override
+    public List<PileMachineInfo> selectMachineByConsUnitId(Long consUnitId) {
+        return pileMachineInfoMapper.selectMachineByConsUnitId(consUnitId);
+    }
+
     private List<ConstUnitNode> buildConsUnitTree(List<ConstUnitNode> consUnitInfos) {
         List<ConstUnitNode> returnList = new ArrayList<>();
         List<Long> tempList = consUnitInfos.stream().map(ConstUnitNode::getId).collect(Collectors.toList());

+ 56 - 28
bd-park/park-backend/park-core/src/main/resources/mapper/cons/ConsPileHoleInfoMapper.xml

@@ -1,28 +1,28 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.huashe.park.core.mapper.ConsPileHoleInfoMapper">
-    
+
     <resultMap type="ConsPileHoleInfo" id="ConsPileHoleInfoResult">
-        <result property="id"    column="id"    />
-        <result property="byteId"    column="byte_id"    />
-        <result property="holeKey"    column="hole_key"    />
-        <result property="holeNum"    column="hole_num"    />
-        <result property="deltaX"    column="delta_x"    />
-        <result property="deltaY"    column="delta_y"    />
-        <result property="lng"    column="lng"    />
-        <result property="lat"    column="lat"    />
-        <result property="consStatus"    column="cons_status"    />
-        <result property="startTime"    column="start_time"    />
-        <result property="endTime"    column="end_time"    />
-        <result property="desDept"    column="des_dept"    />
-        <result property="diameter"    column="diameter"    />
+        <result property="id" column="id"/>
+        <result property="byteId" column="byte_id"/>
+        <result property="holeKey" column="hole_key"/>
+        <result property="holeNum" column="hole_num"/>
+        <result property="deltaX" column="delta_x"/>
+        <result property="deltaY" column="delta_y"/>
+        <result property="lng" column="lng"/>
+        <result property="lat" column="lat"/>
+        <result property="consStatus" column="cons_status"/>
+        <result property="startTime" column="start_time"/>
+        <result property="endTime" column="end_time"/>
+        <result property="desDept" column="des_dept"/>
+        <result property="diameter" column="diameter"/>
         <result property="consUnitId" column="cons_unit_id"/>
-        <result property="updateTime"    column="update_time"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="createBy"    column="create_by"    />
-        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime" column="update_time"/>
+        <result property="createTime" column="create_time"/>
+        <result property="createBy" column="create_by"/>
+        <result property="updateBy" column="update_by"/>
     </resultMap>
 
     <sql id="selectConsPileHoleInfoVo">
@@ -49,9 +49,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectConsPileHoleInfoList" parameterType="ConsPileHoleInfo" resultMap="ConsPileHoleInfoResult">
         <include refid="selectConsPileHoleInfoVo"/>
-        <where>  
-            <if test="holeNum != null  and holeNum != ''"> and hole_num = #{holeNum}</if>
-            <if test="consStatus != null  and consStatus != ''"> and cons_status = #{consStatus}</if>
+        <where>
+            <if test="holeNum != null  and holeNum != ''">and hole_num = #{holeNum}</if>
+            <if test="consStatus != null  and consStatus != ''">and cons_status = #{consStatus}</if>
+        </where>
+    </select>
+
+    <select id="selectConsPileHoleRealtimeIndex" parameterType="ConsPileHoleInfo"
+            resultType="com.huashe.park.domain.dto.cons.PileRealtimeIndex">
+        select cphi.*,
+        cphir.depth,
+        cphir.current,
+        cphir.vertical_deviation,
+        cphir.spray_volume,
+        cphir.spray_pressure,
+        cphir.start_time,
+        cphir.end_time,
+        cphir.status,
+        cphir.tilt_angle,
+        cphir.forward_tilt_angle,
+        from cons_pile_hole_info cphi
+        left join cons_pile_hole_index_realtime cphir
+        on
+        cphi.id = cphir.hole_id
+        <where>
+            <if test="holeNum != null  and holeNum != ''">and cphi.hole_num = #{holeNum}</if>
+            <if test="holeKey != null  and holeKey != ''">and cphi.hole_key = #{holeKey}</if>
+            <if test="consUnitId != null  and consUnitId != ''">and cons_unit_id = #{consUnitId}</if>
+            <if test="consStatus != null  and consStatus != ''">and cons_status != #{consStatus}</if>
+            <if test="id !=null">and cphi.id = #{id}</if>
         </where>
     </select>
 
@@ -62,7 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="consStatus != null  and consStatus != ''">and cons_status != #{consStatus}</if>
         </where>
     </select>
-    
+
     <select id="selectConsPileHoleInfoById" parameterType="Long" resultMap="ConsPileHoleInfoResult">
         <include refid="selectConsPileHoleInfoVo"/>
         where id = #{id}
@@ -92,7 +118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">create_time,</if>
             <if test="createBy != null">create_by,</if>
             <if test="updateBy != null">update_by,</if>
-         </trim>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="byteId != null and byteId != ''">#{byteId},</if>
             <if test="holeKey != null and holeKey != ''">#{holeKey},</if>
@@ -110,7 +136,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">#{createTime},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="updateBy != null">#{updateBy},</if>
-         </trim>
+        </trim>
     </insert>
     <insert id="batchInsertConsPileHoleInfo" parameterType="List" useGeneratedKeys="true" keyProperty="id">
         insert into cons_pile_hole_info
@@ -183,11 +209,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </update>
 
     <delete id="deleteConsPileHoleInfoById" parameterType="Long">
-        delete from cons_pile_hole_info where id = #{id}
+        delete
+        from cons_pile_hole_info
+        where id = #{id}
     </delete>
 
     <delete id="deleteConsPileHoleInfoByIds" parameterType="String">
-        delete from cons_pile_hole_info where id in 
+        delete from cons_pile_hole_info where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>

+ 14 - 0
bd-park/park-backend/park-core/src/main/resources/mapper/cons/PileHoleIndexRealtimeMapper.xml

@@ -18,6 +18,8 @@
         <result property="startTime" column="start_time"/>
         <result property="endTime" column="end_time"/>
         <result property="status" column="status"/>
+        <result property="tiltAngle" column="tilt_angle"/>
+        <result property="forwardTiltAngle" column="forward_tilt_angle"/>
         <result property="updateTime" column="update_time"/>
         <result property="createTime" column="create_time"/>
         <result property="createBy" column="create_by"/>
@@ -38,6 +40,8 @@
                start_time,
                end_time,
                status,
+               tilt_angle,
+               forward_tilt_angle,
                update_time,
                create_time,
                create_by,
@@ -61,6 +65,8 @@
             <if test="startTime != null ">and start_time = #{startTime}</if>
             <if test="endTime != null ">and end_time = #{endTime}</if>
             <if test="status != null  and status != ''">and status = #{status}</if>
+            <if test="tiltAngle != null ">and tilt_angle = #{tiltAngle}</if>
+            <if test="forwardTiltAngle != null ">and forward_tilt_angle = #{forwardTiltAngle}</if>
         </where>
     </select>
 
@@ -85,6 +91,8 @@
             <if test="startTime != null">start_time,</if>
             <if test="endTime != null">end_time,</if>
             <if test="status != null">status,</if>
+            <if test="tiltAngle != null ">tilt_angle,</if>
+            <if test="forwardTiltAngle != null ">forward_tilt_angle,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="createTime != null">create_time,</if>
             <if test="createBy != null">create_by,</if>
@@ -103,6 +111,8 @@
             <if test="startTime != null">#{startTime},</if>
             <if test="endTime != null">#{endTime},</if>
             <if test="status != null">#{status},</if>
+            <if test="tiltAngle != null ">#{tiltAngle},</if>
+            <if test="forwardTiltAngle != null ">#{forwardTiltAngle},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="createBy != null">#{createBy},</if>
@@ -125,6 +135,8 @@
             <if test="startTime != null">start_time = #{startTime},</if>
             <if test="endTime != null">end_time = #{endTime},</if>
             <if test="status != null">status = #{status},</if>
+            <if test="tiltAngle != null ">tilt_angle = #{tiltAngle},</if>
+            <if test="forwardTiltAngle != null ">forward_tilt_angle = #{forwardTiltAngle},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
@@ -144,6 +156,8 @@
             <if test="startTime != null">start_time = #{startTime},</if>
             <if test="endTime != null">end_time = #{endTime},</if>
             <if test="status != null">status = #{status},</if>
+            <if test="tiltAngle != null ">tilt_angle = #{tiltAngle},</if>
+            <if test="forwardTiltAngle != null ">forward_tilt_angle = #{forwardTiltAngle},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="createBy != null">create_by = #{createBy},</if>

+ 19 - 0
bd-park/park-backend/park-core/src/main/resources/mapper/cons/PileMachineInfoMapper.xml

@@ -159,4 +159,23 @@
             #{id}
         </foreach>
     </delete>
+
+    <select id="cntMachineOnOffline">
+        select sum(case when status = '00' then 1 else 0 end) as online,
+               sum(case when status = '01' then 1 else 0 end) as offline
+        from cons_pile_machine_info
+    </select>
+
+    <select id="selectMachineByConsUnitId" resultType="PileMachineInfo">
+        select cpmi.*
+        from cons_pile_machine_info cpmi
+                 inner join cons_cons_unit_machine_rel ccumr
+                            on
+                                cpmi.id = ccumr.machine_id
+                 inner join cons_cons_unit_info ccui
+                            on
+                                ccui.id = ccumr.cons_unit_id
+        where FIND_IN_SET(#{consUnitId}, ccui.ancestors)
+    </select>
+
 </mapper>

+ 54 - 0
bd-park/park-backend/park-domain/src/main/java/com/huashe/park/domain/dto/cons/PileRealtimeIndex.java

@@ -0,0 +1,54 @@
+package com.huashe.park.domain.dto.cons;
+
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.huashe.common.annotation.Excel;
+import com.huashe.park.domain.entity.ConsPileHoleInfo;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class PileRealtimeIndex extends ConsPileHoleInfo {
+    private String machineByteKey;
+
+    private Double tiltAngle;
+
+    private Double forwardTiltAngle;
+
+    /** 桩机实际深度 */
+    @Excel(name = "桩机实际深度")
+    private Double depth;
+
+    /** 电机电流 */
+    @Excel(name = "电机电流")
+    private Double current;
+
+    /** 垂直偏差 */
+    @Excel(name = "垂直偏差")
+    private Double verticalDeviation;
+
+    /** 灌浆体积(m³)ups200送带量 */
+    @Excel(name = "灌浆体积", readConverterExp = "m=³")
+    private Double sprayVolume;
+
+    /** 喷浆压力 ups200 压力值 */
+    @Excel(name = "喷浆压力 ups200 压力值")
+    private Double sprayPressure;
+
+    /** 开始时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd  HH:mm:ss")
+    private Date startTime;
+
+    /** 结束时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd  HH:mm:ss")
+    private Date endTime;
+
+    /** 桩点状态 */
+    @Excel(name = "桩点状态")
+    private String status;
+}

+ 20 - 0
bd-park/park-backend/park-domain/src/main/java/com/huashe/park/domain/entity/PileHoleIndexRealtime.java

@@ -37,6 +37,10 @@ public class PileHoleIndexRealtime extends BaseEntity {
     @Excel(name = "桩机编号")
     private String machineByteKey;
 
+    private Double tiltAngle;
+
+    private Double forwardTiltAngle;
+
     /** 桩机实际深度 */
     @Excel(name = "桩机实际深度")
     private Double depth;
@@ -175,6 +179,22 @@ public class PileHoleIndexRealtime extends BaseEntity {
         return status;
     }
 
+    public Double getTiltAngle() {
+        return tiltAngle;
+    }
+
+    public void setTiltAngle(Double tiltAngle) {
+        this.tiltAngle = tiltAngle;
+    }
+
+    public Double getForwardTiltAngle() {
+        return forwardTiltAngle;
+    }
+
+    public void setForwardTiltAngle(Double forwardTiltAngle) {
+        this.forwardTiltAngle = forwardTiltAngle;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId())