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; @@ -8,5 +8,5 @@ import java.util.List;
8 * Created by li.ma on 2018/12/19. 8 * Created by li.ma on 2018/12/19.
9 */ 9 */
10 public interface CameraRecordMapper { 10 public interface CameraRecordMapper {
11 - List<CameraRecord> queryAllCameraRecord(); 11 + List<CameraRecord> selectAllCameraRecord();
12 } 12 }
  1 +<?xml version="1.0" encoding="UTF-8" ?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3 +<mapper namespace="com.yoho.order.dal.CameraRecordMapper" >
  4 + <resultMap id="BaseResultMap" type="com.yoho.order.model.CameraRecord" >
  5 + <id column="id" property="id" jdbcType="INTEGER" />
  6 + <result column="camera_code" property="cameraCode" javaType="INTEGER" />
  7 + <result column="camera_Name" property="cameraName" jdbcType="VARCHAR" />
  8 + <result column="vedio_file_url" property="vedioFileUrl" jdbcType="VARCHAR" />
  9 + </resultMap>
  10 + <sql id="Base_Column_List" >
  11 + id, camera_code, camera_Name, vedio_file_url
  12 + </sql>
  13 + <select id="selectAllCameraRecord" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  14 + select
  15 + <include refid="Base_Column_List" />
  16 + from camera_record
  17 + </select>
  18 +</mapper>
@@ -117,7 +117,7 @@ public class UfoLiveService implements ApplicationContextAware { @@ -117,7 +117,7 @@ public class UfoLiveService implements ApplicationContextAware {
117 } 117 }
118 118
119 public String queryM3u8Url(Integer cameraCode) throws PlatformException { 119 public String queryM3u8Url(Integer cameraCode) throws PlatformException {
120 - List<CameraRecord> cameraRecordList = cameraRecordMapper.queryAllCameraRecord(); 120 + List<CameraRecord> cameraRecordList = cameraRecordMapper.selectAllCameraRecord();
121 121
122 for (CameraRecord item : cameraRecordList) { 122 for (CameraRecord item : cameraRecordList) {
123 if (item.getCameraCode().equals(cameraCode)) { 123 if (item.getCameraCode().equals(cameraCode)) {
@@ -128,7 +128,7 @@ public class UfoLiveService implements ApplicationContextAware { @@ -128,7 +128,7 @@ public class UfoLiveService implements ApplicationContextAware {
128 } 128 }
129 129
130 public List<CameraRecordResp> queryCameraRecord(QNliveReq req) { 130 public List<CameraRecordResp> queryCameraRecord(QNliveReq req) {
131 - List<CameraRecord> cameraRecordList = cameraRecordMapper.queryAllCameraRecord(); 131 + List<CameraRecord> cameraRecordList = cameraRecordMapper.selectAllCameraRecord();
132 132
133 List<CameraRecordResp> cameraRecordResps = new ArrayList<>(); 133 List<CameraRecordResp> cameraRecordResps = new ArrayList<>();
134 cameraRecordList.stream().forEach(item -> cameraRecordResps.add(new CameraRecordResp(item.getCameraCode(), item.getCameraName()))); 134 cameraRecordList.stream().forEach(item -> cameraRecordResps.add(new CameraRecordResp(item.getCameraCode(), item.getCameraName())));
@@ -36,6 +36,8 @@ datasources: @@ -36,6 +36,8 @@ datasources:
36 - com.yoho.order.dal.SellerWalletDetailMapper 36 - com.yoho.order.dal.SellerWalletDetailMapper
37 - com.yoho.order.dal.SellerWalletMapper 37 - com.yoho.order.dal.SellerWalletMapper
38 - com.yoho.order.dal.QiniuLiveRecordMapper 38 - com.yoho.order.dal.QiniuLiveRecordMapper
  39 + - com.yoho.order.dal.CameraRecordMapper
  40 +
39 ufo_resource: 41 ufo_resource:
40 servers: 42 servers:
41 - 192.168.102.219:3306 43 - 192.168.102.219:3306
@@ -36,6 +36,7 @@ datasources: @@ -36,6 +36,7 @@ datasources:
36 - com.yoho.order.dal.SellerWalletDetailMapper 36 - com.yoho.order.dal.SellerWalletDetailMapper
37 - com.yoho.order.dal.SellerWalletMapper 37 - com.yoho.order.dal.SellerWalletMapper
38 - com.yoho.order.dal.QiniuLiveRecordMapper 38 - com.yoho.order.dal.QiniuLiveRecordMapper
  39 + - com.yoho.order.dal.CameraRecordMapper
39 40
40 ufo_resource: 41 ufo_resource:
41 servers: 42 servers:
@@ -700,8 +700,8 @@ function addRecordPage(skup, order_code, id) { @@ -700,8 +700,8 @@ function addRecordPage(skup, order_code, id) {
700 var div = $("<div id='recordDiv'>").appendTo($(document.body)); 700 var div = $("<div id='recordDiv'>").appendTo($(document.body));
701 var url = contextPath + "/html/judgeCenter/record.html"; 701 var url = contextPath + "/html/judgeCenter/record.html";
702 $(div).myDialog({ 702 $(div).myDialog({
703 - width: "25%",  
704 - height: "20%", 703 + width: "45%",
  704 + height: "35%",
705 title: "视频录制", 705 title: "视频录制",
706 href: url, 706 href: url,
707 modal: true, 707 modal: true,
@@ -713,12 +713,21 @@ function addRecordPage(skup, order_code, id) { @@ -713,12 +713,21 @@ function addRecordPage(skup, order_code, id) {
713 iconCls: "icon-save", 713 iconCls: "icon-save",
714 onClick: function () { 714 onClick: function () {
715 if (!$('#startTime').val() || $('#startTime').val() == '') { 715 if (!$('#startTime').val() || $('#startTime').val() == '') {
  716 + if ($("#cameraCode").myCombobox("getValue") == undefined || $("#cameraCode").myCombobox("getValue") == '')
  717 + {
  718 + window.self.$.messager.alert("失败", "先选择摄像头", "error");
  719 + return;
  720 + }
  721 +
  722 +
716 timedCount(); 723 timedCount();
717 $('#recordBtn').linkbutton({text:'结束录制'}); 724 $('#recordBtn').linkbutton({text:'结束录制'});
718 $('#startTime').val(parseInt(new Date().getTime() / 1000)); 725 $('#startTime').val(parseInt(new Date().getTime() / 1000));
  726 + //$("#startTime").textbox('setValue',parseInt(new Date().getTime() / 1000));
719 } else if ($('#endTime').val() == '') { 727 } else if ($('#endTime').val() == '') {
720 stopCount(); 728 stopCount();
721 $('#endTime').val(parseInt(new Date().getTime() / 1000)); 729 $('#endTime').val(parseInt(new Date().getTime() / 1000));
  730 + // $("#endTime").textbox('setValue',parseInt(new Date().getTime() / 1000));
722 $('#recordBtn').linkbutton({text:'上传云端'}); 731 $('#recordBtn').linkbutton({text:'上传云端'});
723 } else if ($('#startTime').val() != '' && $('#endTime').val() != ''){ 732 } else if ($('#startTime').val() != '' && $('#endTime').val() != ''){
724 $('#recordBtn').linkbutton('disable'); 733 $('#recordBtn').linkbutton('disable');
@@ -726,7 +735,7 @@ function addRecordPage(skup, order_code, id) { @@ -726,7 +735,7 @@ function addRecordPage(skup, order_code, id) {
726 id : id, 735 id : id,
727 skup : skup, 736 skup : skup,
728 orderCode : order_code, 737 orderCode : order_code,
729 - cameraCode : $('#cameraCode').val(), 738 + cameraCode : $("#cameraCode").myCombobox("getValue"),
730 startTime : $('#startTime').val(), 739 startTime : $('#startTime').val(),
731 endTime : $('#endTime').val(), 740 endTime : $('#endTime').val(),
732 depotNo: $("#depotNo").combobox("getValue") 741 depotNo: $("#depotNo").combobox("getValue")
@@ -9,25 +9,27 @@ @@ -9,25 +9,27 @@
9 <input style="display: none" id="endTime" type="text"/> 9 <input style="display: none" id="endTime" type="text"/>
10 10
11 <ul> 11 <ul>
12 - <li> 12 + <li style="padding-bottom: 10px;">
  13 + <label>摄像头:</label>
13 <input id="cameraCode" type="text"/> 14 <input id="cameraCode" type="text"/>
14 </li> 15 </li>
15 - <li>  
16 - 计时&nbsp;:&nbsp;<input id='txt' type='text'/> 16 + <li style="padding-bottom: 10px;">
  17 + <label>计时器:</label>
  18 + <input id="txt" type="text" class="easyui-textbox" style="width:200px"/>
17 </li> 19 </li>
18 - <li>  
19 - 时长&nbsp;:&nbsp;<input id='total' type='text'/> 20 + <li style="padding-bottom: 10px;">
  21 + <label>总时长:</label>
  22 + <input id="total" type="text" class="easyui-textbox" style="width:200px"/>
20 </li> 23 </li>
21 </ul> 24 </ul>
22 <script type="text/javascript"> 25 <script type="text/javascript">
23 - $(function () {  
24 var c = 0 26 var c = 0
25 var t 27 var t
26 if (t) { 28 if (t) {
27 clearTimeout(t); 29 clearTimeout(t);
28 } 30 }
29 function timedCount() { 31 function timedCount() {
30 - document.getElementById('txt').value = c 32 + $('#txt').textbox('setValue', c)
31 c = c + 1 33 c = c + 1
32 t = setTimeout("timedCount()", 1000) 34 t = setTimeout("timedCount()", 1000)
33 } 35 }
@@ -46,10 +48,10 @@ @@ -46,10 +48,10 @@
46 } 48 }
47 49
48 c = 0; 50 c = 0;
49 - setTimeout("document.getElementById('total').value=totalVar", 0); 51 + setTimeout("$('#total').textbox('setValue', totalVar)", 0);
50 clearTimeout(t); 52 clearTimeout(t);
51 } 53 }
52 - 54 + $(function () {
53 $.ajax({ 55 $.ajax({
54 contentType: "application/json", 56 contentType: "application/json",
55 dataType: "json", 57 dataType: "json",