ard-work/src/main/java/com/ruoyi/device/camera/controller/ArdCamerasController.java
@@ -154,6 +154,7 @@ Map option = new HashMap(); option.put("value", item.getId()); option.put("label", item.getName()); option.put("channel", item.getChannel()); // option.put("description", item.getOilProduction()); options.add(option); } ard-work/src/main/java/com/ruoyi/inspect/controller/ArdVideoInspectRecordController.java
@@ -2,16 +2,10 @@ import java.util.List; import javax.servlet.http.HttpServletResponse; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; 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 org.springframework.web.bind.annotation.*; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; @@ -29,8 +23,7 @@ */ @RestController @RequestMapping("/inspect/record") public class ArdVideoInspectRecordController extends BaseController { public class ArdVideoInspectRecordController extends BaseController { @Autowired private IArdVideoInspectRecordService ardVideoInspectRecordService; @@ -39,11 +32,25 @@ */ @PreAuthorize("@ss.hasPermi('inspect:record:list')") @GetMapping("/list") public TableDataInfo list(ArdVideoInspectRecord ardVideoInspectRecord) { public TableDataInfo list(ArdVideoInspectRecord ardVideoInspectRecord) { startPage(); List<ArdVideoInspectRecord> list = ardVideoInspectRecordService.selectArdVideoInspectRecordList(ardVideoInspectRecord); return getDataTable(list); } @PreAuthorize("@ss.hasPermi('inspect:record:list')") @GetMapping("/listByStartTime") public TableDataInfo listByStartTime(ArdVideoInspectRecord ardVideoInspectRecord) { startPage(); List list = ardVideoInspectRecordService.selectArdVideoInspectRecordListByStartTime(ardVideoInspectRecord); return getDataTable(list); } @PreAuthorize("@ss.hasPermi('inspect:record:list')") @GetMapping("/getFileCountByStartMonth") public List getFileCountByStartMonth(@RequestParam("startMonth") String startMonth) { List list = ardVideoInspectRecordService.selectArdVideoInspectRecordCountByStartMonth(startMonth); return list; } /** @@ -52,8 +59,7 @@ @PreAuthorize("@ss.hasPermi('inspect:record:export')") @Log(title = "视频巡检记录", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, ArdVideoInspectRecord ardVideoInspectRecord) { public void export(HttpServletResponse response, ArdVideoInspectRecord ardVideoInspectRecord) { List<ArdVideoInspectRecord> list = ardVideoInspectRecordService.selectArdVideoInspectRecordList(ardVideoInspectRecord); ExcelUtil<ArdVideoInspectRecord> util = new ExcelUtil<ArdVideoInspectRecord>(ArdVideoInspectRecord.class); util.exportExcel(response, list, "视频巡检记录数据"); @@ -64,8 +70,7 @@ */ @PreAuthorize("@ss.hasPermi('inspect:record:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") String id) { public AjaxResult getInfo(@PathVariable("id") String id) { return success(ardVideoInspectRecordService.selectArdVideoInspectRecordById(id)); } @@ -75,8 +80,7 @@ @PreAuthorize("@ss.hasPermi('inspect:record:add')") @Log(title = "视频巡检记录", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody ArdVideoInspectRecord ardVideoInspectRecord) { public AjaxResult add(@RequestBody ArdVideoInspectRecord ardVideoInspectRecord) { return toAjax(ardVideoInspectRecordService.insertArdVideoInspectRecord(ardVideoInspectRecord)); } @@ -86,8 +90,7 @@ @PreAuthorize("@ss.hasPermi('inspect:record:edit')") @Log(title = "视频巡检记录", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody ArdVideoInspectRecord ardVideoInspectRecord) { public AjaxResult edit(@RequestBody ArdVideoInspectRecord ardVideoInspectRecord) { return toAjax(ardVideoInspectRecordService.updateArdVideoInspectRecord(ardVideoInspectRecord)); } @@ -97,8 +100,7 @@ @PreAuthorize("@ss.hasPermi('inspect:record:remove')") @Log(title = "视频巡检记录", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable String[] ids) { public AjaxResult remove(@PathVariable String[] ids) { return toAjax(ardVideoInspectRecordService.deleteArdVideoInspectRecordByIds(ids)); } } ard-work/src/main/java/com/ruoyi/inspect/controller/ArdVideoInspectTaskController.java
@@ -2,6 +2,8 @@ import java.util.List; import javax.servlet.http.HttpServletResponse; import com.ruoyi.common.utils.uuid.UUID; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -77,6 +79,7 @@ @PostMapping public AjaxResult add(@RequestBody ArdVideoInspectTask ardVideoInspectTask) { ardVideoInspectTask.setId(UUID.randomUUID().toString()); return toAjax(ardVideoInspectTaskService.insertArdVideoInspectTask(ardVideoInspectTask)); } ard-work/src/main/java/com/ruoyi/inspect/mapper/ArdVideoInspectRecordMapper.java
@@ -26,6 +26,7 @@ * @return 视频巡检记录集合 */ public List<ArdVideoInspectRecord> selectArdVideoInspectRecordList(ArdVideoInspectRecord ardVideoInspectRecord); public List selectArdVideoInspectRecordListByStartTime(ArdVideoInspectRecord ardVideoInspectRecord); /** * 新增视频巡检记录 @@ -58,4 +59,6 @@ * @return 结果 */ public int deleteArdVideoInspectRecordByIds(String[] ids); List selectArdVideoInspectRecordCountByStartMonth(String startMonth); } ard-work/src/main/java/com/ruoyi/inspect/service/IArdVideoInspectRecordService.java
@@ -28,6 +28,14 @@ public List<ArdVideoInspectRecord> selectArdVideoInspectRecordList(ArdVideoInspectRecord ardVideoInspectRecord); /** * 按日期查询 * @param ardVideoInspectRecord * @return */ public List selectArdVideoInspectRecordListByStartTime(ArdVideoInspectRecord ardVideoInspectRecord); public List selectArdVideoInspectRecordCountByStartMonth(String startMonth); /** * 新增视频巡检记录 * * @param ardVideoInspectRecord 视频巡检记录 ard-work/src/main/java/com/ruoyi/inspect/service/impl/ArdVideoInspectRecordServiceImpl.java
@@ -42,6 +42,20 @@ return ardVideoInspectRecordMapper.selectArdVideoInspectRecordList(ardVideoInspectRecord); } @Override public List selectArdVideoInspectRecordListByStartTime(ArdVideoInspectRecord ardVideoInspectRecord) { return ardVideoInspectRecordMapper.selectArdVideoInspectRecordListByStartTime(ardVideoInspectRecord); } /** * 按月份获取每日记录文件数量 * @param startMonth * @return */ public List<ArdVideoInspectRecord> selectArdVideoInspectRecordCountByStartMonth(String startMonth) { return ardVideoInspectRecordMapper.selectArdVideoInspectRecordCountByStartMonth(startMonth); } /** * 新增视频巡检记录 * ard-work/src/main/resources/mapper/inspect/ArdVideoInspectRecordMapper.xml
@@ -29,6 +29,18 @@ <if test="userId != null and userId != ''"> and user_id = #{userId}</if> </where> </select> <!--按日期查询--> <select id="selectArdVideoInspectRecordListByStartTime" parameterType="ArdVideoInspectRecord" resultType="java.util.HashMap"> select r.*,s.well_id,w.well_id as well_name from ard_video_inspect_record r ,ard_video_inspect_task_step s,ard_alarmpoints_well w where start_time like ('${startTime}%') and r.step_id = s.id and s.well_id = w.id </select> <!--按月份统计文件数量--> <select id="selectArdVideoInspectRecordCountByStartMonth" parameterType="String" resultType="java.util.HashMap"> select f.start_date,count(*) from (select substring(r.start_time,0,11)as start_date,* from ard_video_inspect_record r where r.start_time like '${startMonth}%') as f group by f.start_date </select> <select id="selectArdVideoInspectRecordById" parameterType="String" resultMap="ArdVideoInspectRecordResult"> <include refid="selectArdVideoInspectRecordVo"/> ard-work/src/main/resources/mapper/inspect/ArdVideoInspectTaskMapper.xml
@@ -50,6 +50,7 @@ <if test="cameraId != null and cameraId != ''"> and camera_id = #{cameraId}</if> <if test="channel != null "> and channel = #{channel}</if> </where> order by id </select> <select id="selectArdVideoInspectTaskById" parameterType="String" resultMap="ArdVideoInspectTaskArdVideoInspectTaskStepResult"> @@ -148,9 +149,9 @@ </delete> <insert id="batchArdVideoInspectTaskStep"> insert into ard_video_inspect_task_step( task_id, dept_id, user_id, id, order_number, recording_time, well_id) values insert into ard_video_inspect_task_step( task_id, dept_id, user_id, order_number, recording_time, well_id) values <foreach item="item" index="index" collection="list" separator=","> ( #{item.taskId}, #{item.deptId}, #{item.userId}, #{item.id}, #{item.orderNumber}, #{item.recordingTime}, #{item.wellId}) ( #{item.taskId}, #{item.deptId}, #{item.userId}, #{item.orderNumber}, #{item.recordingTime}, #{item.wellId}) </foreach> </insert> </mapper>