Authored by 张帅

Merge branch 'test6.8.4' of http://git.yoho.cn/ufo/ufo-platform into test6.8.4

... ... @@ -8,5 +8,5 @@ import java.util.List;
* Created by li.ma on 2018/12/19.
*/
public interface CameraRecordMapper {
List<CameraRecord> queryAllCameraRecord();
List<CameraRecord> selectAllCameraRecord();
}
... ...
<?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" >
<mapper namespace="com.yoho.order.dal.CameraRecordMapper" >
<resultMap id="BaseResultMap" type="com.yoho.order.model.CameraRecord" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="camera_code" property="cameraCode" javaType="INTEGER" />
<result column="camera_Name" property="cameraName" jdbcType="VARCHAR" />
<result column="vedio_file_url" property="vedioFileUrl" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, camera_code, camera_Name, vedio_file_url
</sql>
<select id="selectAllCameraRecord" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from camera_record
</select>
</mapper>
\ No newline at end of file
... ...
... ... @@ -117,7 +117,7 @@ public class UfoLiveService implements ApplicationContextAware {
}
public String queryM3u8Url(Integer cameraCode) throws PlatformException {
List<CameraRecord> cameraRecordList = cameraRecordMapper.queryAllCameraRecord();
List<CameraRecord> cameraRecordList = cameraRecordMapper.selectAllCameraRecord();
for (CameraRecord item : cameraRecordList) {
if (item.getCameraCode().equals(cameraCode)) {
... ... @@ -128,7 +128,7 @@ public class UfoLiveService implements ApplicationContextAware {
}
public List<CameraRecordResp> queryCameraRecord(QNliveReq req) {
List<CameraRecord> cameraRecordList = cameraRecordMapper.queryAllCameraRecord();
List<CameraRecord> cameraRecordList = cameraRecordMapper.selectAllCameraRecord();
List<CameraRecordResp> cameraRecordResps = new ArrayList<>();
cameraRecordList.stream().forEach(item -> cameraRecordResps.add(new CameraRecordResp(item.getCameraCode(), item.getCameraName())));
... ...
... ... @@ -36,6 +36,8 @@ datasources:
- com.yoho.order.dal.SellerWalletDetailMapper
- com.yoho.order.dal.SellerWalletMapper
- com.yoho.order.dal.QiniuLiveRecordMapper
- com.yoho.order.dal.CameraRecordMapper
ufo_resource:
servers:
- 192.168.102.219:3306
... ...
... ... @@ -36,6 +36,7 @@ datasources:
- com.yoho.order.dal.SellerWalletDetailMapper
- com.yoho.order.dal.SellerWalletMapper
- com.yoho.order.dal.QiniuLiveRecordMapper
- com.yoho.order.dal.CameraRecordMapper
ufo_resource:
servers:
... ...
... ... @@ -700,8 +700,8 @@ function addRecordPage(skup, order_code, id) {
var div = $("<div id='recordDiv'>").appendTo($(document.body));
var url = contextPath + "/html/judgeCenter/record.html";
$(div).myDialog({
width: "25%",
height: "20%",
width: "45%",
height: "35%",
title: "视频录制",
href: url,
modal: true,
... ... @@ -713,12 +713,21 @@ function addRecordPage(skup, order_code, id) {
iconCls: "icon-save",
onClick: function () {
if (!$('#startTime').val() || $('#startTime').val() == '') {
if ($("#cameraCode").myCombobox("getValue") == undefined || $("#cameraCode").myCombobox("getValue") == '')
{
window.self.$.messager.alert("失败", "先选择摄像头", "error");
return;
}
timedCount();
$('#recordBtn').linkbutton({text:'结束录制'});
$('#startTime').val(parseInt(new Date().getTime() / 1000));
//$("#startTime").textbox('setValue',parseInt(new Date().getTime() / 1000));
} else if ($('#endTime').val() == '') {
stopCount();
$('#endTime').val(parseInt(new Date().getTime() / 1000));
// $("#endTime").textbox('setValue',parseInt(new Date().getTime() / 1000));
$('#recordBtn').linkbutton({text:'上传云端'});
} else if ($('#startTime').val() != '' && $('#endTime').val() != ''){
$('#recordBtn').linkbutton('disable');
... ... @@ -726,7 +735,7 @@ function addRecordPage(skup, order_code, id) {
id : id,
skup : skup,
orderCode : order_code,
cameraCode : $('#cameraCode').val(),
cameraCode : $("#cameraCode").myCombobox("getValue"),
startTime : $('#startTime').val(),
endTime : $('#endTime').val(),
depotNo: $("#depotNo").combobox("getValue")
... ...
... ... @@ -9,47 +9,49 @@
<input style="display: none" id="endTime" type="text"/>
<ul>
<li>
<li style="padding-bottom: 10px;">
<label>摄像头:</label>
<input id="cameraCode" type="text"/>
</li>
<li>
计时&nbsp;:&nbsp;<input id='txt' type='text'/>
<li style="padding-bottom: 10px;">
<label>计时器:</label>
<input id="txt" type="text" class="easyui-textbox" style="width:200px"/>
</li>
<li>
时长&nbsp;:&nbsp;<input id='total' type='text'/>
<li style="padding-bottom: 10px;">
<label>总时长:</label>
<input id="total" type="text" class="easyui-textbox" style="width:200px"/>
</li>
</ul>
<script type="text/javascript">
$(function () {
var c = 0
var t
if (t) {
clearTimeout(t);
}
function timedCount() {
document.getElementById('txt').value = c
c = c + 1
t = setTimeout("timedCount()", 1000)
}
var c = 0
var t
if (t) {
clearTimeout(t);
}
function timedCount() {
$('#txt').textbox('setValue', c)
c = c + 1
t = setTimeout("timedCount()", 1000)
}
var totalVar;
var totalVar;
function stopCount() {
var endTime = $('#endTime').val();
var startTime = $('#startTime').val();
var secondVar = parseInt((endTime - startTime) % 60);
if (endTime - startTime > 60) {
var minuteVar = parseInt((endTime - startTime) / 60);
totalVar = minuteVar + '分' + secondVar + '秒';
} else {
totalVar = secondVar + '秒';
}
c = 0;
setTimeout("document.getElementById('total').value=totalVar", 0);
clearTimeout(t);
function stopCount() {
var endTime = $('#endTime').val();
var startTime = $('#startTime').val();
var secondVar = parseInt((endTime - startTime) % 60);
if (endTime - startTime > 60) {
var minuteVar = parseInt((endTime - startTime) / 60);
totalVar = minuteVar + '分' + secondVar + '秒';
} else {
totalVar = secondVar + '秒';
}
c = 0;
setTimeout("$('#total').textbox('setValue', totalVar)", 0);
clearTimeout(t);
}
$(function () {
$.ajax({
contentType: "application/json",
dataType: "json",
... ...