@ -192,7 +192,7 @@ public class PLCServiceImpl implements PLCService {
return ;
return ;
}
}
String saveApiPath = dictDataService . parseDictData ( "base_conf" , "data_api_path" ) . getValue ( ) ;
KescEntity kescEntity = new KescEntity ( ) ;
KescEntity kescEntity = new KescEntity ( ) ;
kescEntity . setData ( dataInfo ) ;
kescEntity . setData ( dataInfo ) ;
// 判断巷道有几个相机 如果只有一个,则调用一个,如果是两个,先判断是否有对拍设置决定那个相机拍摄
// 判断巷道有几个相机 如果只有一个,则调用一个,如果是两个,先判断是否有对拍设置决定那个相机拍摄
@ -209,7 +209,7 @@ public class PLCServiceImpl implements PLCService {
String pathSrc = PathUtil . createFileName ( dataInfo , street , picCmd , ".jpg" ) ;
String pathSrc = PathUtil . createFileName ( dataInfo , street , picCmd , ".jpg" ) ;
pathSrc = cameraCapture ( camera , false , pathSrc , dictDataService . getDictDataList ( "camera_conf" ) ) ;
pathSrc = cameraCapture ( camera , false , pathSrc , dictDataService . getDictDataList ( "camera_conf" ) ) ;
order . setPics ( Strings . hasText ( order . getPics ( ) ) ? order . getPics ( ) + ";" + pathSrc : pathSrc ) ;
order . setPics ( Strings . hasText ( order . getPics ( ) ) ? order . getPics ( ) + ";" + saveApiPath + pathSrc : saveApiPath + pathSrc ) ;
orderMapper . updateById ( order ) ;
orderMapper . updateById ( order ) ;
}
}
//转向原点位
//转向原点位
@ -229,6 +229,8 @@ public class PLCServiceImpl implements PLCService {
@Override
@Override
public void check ( KsecDataInfo dataInfo ) {
public void check ( KsecDataInfo dataInfo ) {
String saveApiPath = dictDataService . parseDictData ( "base_conf" , "data_api_path" ) . getValue ( ) ;
long startTime = System . currentTimeMillis ( ) ;
long startTime = System . currentTimeMillis ( ) ;
String uuid = UUID . randomUUID ( ) . toString ( ) ;
String uuid = UUID . randomUUID ( ) . toString ( ) ;
@ -277,7 +279,7 @@ public class PLCServiceImpl implements PLCService {
String pathSrc = PathUtil . createFileName ( dataInfo , street , "E1" , ".jpg" ) ;
String pathSrc = PathUtil . createFileName ( dataInfo , street , "E1" , ".jpg" ) ;
CameraDO camera = cameraService . getById ( dataInfo . getFromDirection ( ) = = 1 ? street . getCamera1Id ( ) : street . getCamera2Id ( ) ) ;
CameraDO camera = cameraService . getById ( dataInfo . getFromDirection ( ) = = 1 ? street . getCamera1Id ( ) : street . getCamera2Id ( ) ) ;
pathSrc = cameraCapture ( camera , false , pathSrc , dictDataService . getDictDataList ( "camera_conf" ) ) ;
pathSrc = cameraCapture ( camera , false , pathSrc , dictDataService . getDictDataList ( "camera_conf" ) ) ;
urlResourcesService . save ( URLResourcesDo . builder ( ) . url ( pathSrc) . uuid ( uuid ) . type ( "1" ) . little ( "球机拍照" ) . build ( ) ) ;
urlResourcesService . save ( URLResourcesDo . builder ( ) . url ( saveApiPath+ pathSrc) . uuid ( uuid ) . type ( "1" ) . little ( "球机拍照" ) . build ( ) ) ;
// 先记录正常未盘点情况
// 先记录正常未盘点情况
stockService . saveOrUpdate ( stock ) ;
stockService . saveOrUpdate ( stock ) ;
@ -499,6 +501,18 @@ public class PLCServiceImpl implements PLCService {
//todo 昆船的项目 ,取货 放货是独立的
//todo 昆船的项目 ,取货 放货是独立的
//取货是是不知道放货的位置的, 所以订单开始的时候只写1位置
//取货是是不知道放货的位置的, 所以订单开始的时候只写1位置
//订单结束写2位置
//订单结束写2位置
if ( street . getCamera1Id ( ) ! = null ) {
String path = zLMediaKitService . startRecord ( "live" , street . getCamera1Id ( ) . toString ( ) ) ;
// String path = cameraVideo(street.getCamera1Id(), pathSrc, order.getCreateTime(), endDownLoadTime, dictDataList);
order . setVideoPath1 ( path ) ;
}
if ( street . getCamera2Id ( ) ! = null ) {
String path = zLMediaKitService . startRecord ( "live" , street . getCamera2Id ( ) . toString ( ) ) ;
order . setVideoPath2 ( path ) ;
}
orderMapper . insert ( order ) ;
orderMapper . insert ( order ) ;
// OrderRealtime.startOrder(street.getId(), plcCmdInfo.getOrderNum());
// OrderRealtime.startOrder(street.getId(), plcCmdInfo.getOrderNum());
}
}
@ -534,17 +548,16 @@ public class PLCServiceImpl implements PLCService {
if ( duration . toMinutes ( ) > 50 ) {
if ( duration . toMinutes ( ) > 50 ) {
endDownLoadTime = order . getCreateTime ( ) . plusMinutes ( 50 ) ;
endDownLoadTime = order . getCreateTime ( ) . plusMinutes ( 50 ) ;
}
}
if ( street . getCamera1Id ( ) ! = null ) {
if ( street . getCamera1Id ( ) ! = null ) {
String pathSrc = PathUtil . createFileName ( ksecDataInfo , street , "B2-1" , ".mp4" ) ;
zLMediaKitService . stopRecord ( "live" , street . getCamera1Id ( ) . toString ( ) ) ;
String path = zLMediaKitService . startRecord ( "live" , street . getCamera1Id ( ) . toString ( ) ) ;
// String path = cameraVideo(street.getCamera1Id(), pathSrc, order.getCreateTime(), endDownLoadTime, dictDataList);
// String path = cameraVideo(street.getCamera1Id(), pathSrc, order.getCreateTime(), endDownLoadTime, dictDataList);
update . setVideoPath1 ( path ) ;
}
}
if ( street . getCamera2Id ( ) ! = null ) {
if ( street . getCamera2Id ( ) ! = null ) {
String pathSrc = PathUtil . createFileName ( ksecDataInfo , street , "B2-2" , ".mp4" ) ;
zLMediaKitService . stopRecord ( "live" , street . getCamera2Id ( ) . toString ( ) ) ;
String path = cameraVideo ( street . getCamera2Id ( ) , pathSrc , order . getCreateTime ( ) , endDownLoadTime , dictDataList ) ;
update . setVideoPath2 ( path ) ;
}
}
orderMapper . updateById ( update ) ;
orderMapper . updateById ( update ) ;