|
|
|
|
@ -222,7 +222,18 @@ public class PlcService {
|
|
|
|
|
if(code.startsWith("C1") || code.startsWith("C3")){
|
|
|
|
|
delay = true;
|
|
|
|
|
}
|
|
|
|
|
path = cameraCapture(cameraId,delay,configProperties.getCameraConfig().getDelayCaptureTime());
|
|
|
|
|
Integer row = 0;
|
|
|
|
|
Integer column = 0;
|
|
|
|
|
if(times<=2){
|
|
|
|
|
row = plcCmdInfo.getRow1();
|
|
|
|
|
column = plcCmdInfo.getColumn1();
|
|
|
|
|
}else {
|
|
|
|
|
row = plcCmdInfo.getRow2();
|
|
|
|
|
column = plcCmdInfo.getColumn2();
|
|
|
|
|
}
|
|
|
|
|
path = PathUtil.createFileNameByRowColumn("jpg",cameraId,row,column);
|
|
|
|
|
|
|
|
|
|
path = cameraCapture(cameraId,delay,configProperties.getCameraConfig().getDelayCaptureTime(),path);
|
|
|
|
|
}
|
|
|
|
|
//update order info after capture
|
|
|
|
|
if (path != null && needCapture) {
|
|
|
|
|
@ -281,8 +292,8 @@ public class PlcService {
|
|
|
|
|
*
|
|
|
|
|
* @Return pic address
|
|
|
|
|
*/
|
|
|
|
|
public String cameraCapture(Integer cameraId,Boolean delay,Long delayTime) {
|
|
|
|
|
String path = PathUtil.createFileName("jpg",cameraId);
|
|
|
|
|
public String cameraCapture(Integer cameraId,Boolean delay,Long delayTime,String path) {
|
|
|
|
|
//String path = PathUtil.createFileName("jpg",cameraId);
|
|
|
|
|
String realPath = configProperties.getSavePath().getMediaPath() + path;
|
|
|
|
|
if(delay){
|
|
|
|
|
TaskDelayExecutor.addPicDelayTask(cameraId,realPath,delayTime);
|
|
|
|
|
@ -522,7 +533,8 @@ public class PlcService {
|
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
String path = cameraCapture(cameraId,false,null);
|
|
|
|
|
String path = PathUtil.createFileNameByRowColumn("jpg",cameraId,plcCmdInfo.getRow1(),plcCmdInfo.getColumn1());
|
|
|
|
|
cameraCapture(cameraId,false,null,path);
|
|
|
|
|
//托盘码
|
|
|
|
|
String trayCode = null;
|
|
|
|
|
Boolean trayCheck = Boolean.TRUE;
|
|
|
|
|
|