|
|
|
|
@ -634,23 +634,13 @@ public class PlcService {
|
|
|
|
|
Integer inout = Integer.valueOf(goodsLocation.substring(11,12));
|
|
|
|
|
log.info("camera id:{}, row:{}, column:{}, direction:{}, inout:{}", cameraId, row, column, leftRight, inout);
|
|
|
|
|
|
|
|
|
|
//转动拍照
|
|
|
|
|
gyrateCameraByCode(cameraId,"C1");
|
|
|
|
|
//等待2s再拍照
|
|
|
|
|
try {
|
|
|
|
|
Thread.sleep(2000l);
|
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String path = PathUtil.createFileNameByRowColumn("jpg",cameraId,row,column, goodsLocation);
|
|
|
|
|
Order oldOrder = orderMapper.getOneByOrderNum(taskId);
|
|
|
|
|
Order order = new Order();
|
|
|
|
|
order.setStreetId(street.getId());
|
|
|
|
|
order.setOrderNum(taskId);
|
|
|
|
|
order.setLeftRight1(leftRight);
|
|
|
|
|
order.setInOut1(inout);
|
|
|
|
|
order.setIntoStockPic(path);
|
|
|
|
|
order.setIntoStockTime(LocalDateTime.now());
|
|
|
|
|
order.setRow1(row);
|
|
|
|
|
order.setColumn1(column);
|
|
|
|
|
@ -660,8 +650,23 @@ public class PlcService {
|
|
|
|
|
// orderMapper.insert(order);
|
|
|
|
|
// }
|
|
|
|
|
orderMapper.insert(order);
|
|
|
|
|
cameraCapture(cameraId,false,0l,path);
|
|
|
|
|
return configProperties.getIP()+":9007/api/pic/"+path;
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 相机转动,拍照,并返回两张照片地址
|
|
|
|
|
* 顶部拍照 C1
|
|
|
|
|
* @param SRMNumber
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public String IntoStockSave(String SRMNumber,String taskId,String goodsLocation,String picName){
|
|
|
|
|
|
|
|
|
|
Order oldOrder = orderMapper.getOneByOrderNum(taskId);
|
|
|
|
|
oldOrder.setIntoStockPic(picName);
|
|
|
|
|
orderMapper.updateById(oldOrder);
|
|
|
|
|
String[] pics = picName.split(",");
|
|
|
|
|
return configProperties.getIP()+":9007/api/pic/"+pics[0]+ configProperties.getIP()+":9007/api/pic/"+pics[1];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|