|
|
|
|
@ -12,6 +12,7 @@ import com.zhehekeji.web.service.RFID.RFIDSocket;
|
|
|
|
|
import com.zhehekeji.web.service.hikLightSource.HikControlSocket;
|
|
|
|
|
import com.zhehekeji.web.service.ksec.KsecNettyClient;
|
|
|
|
|
import com.zhehekeji.web.service.sick.SickSocket;
|
|
|
|
|
import io.swagger.models.auth.In;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@ -504,6 +505,21 @@ public class PlcService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 调用对面的相机id
|
|
|
|
|
* @param plcCmdInfo
|
|
|
|
|
* @param leftRight
|
|
|
|
|
* @param cameraId
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
public Integer getCameraByPlcCmd(PlcCmdInfo plcCmdInfo, Integer leftRight, Integer cameraId) {
|
|
|
|
|
Street street = streetService.getStreetByPlcId(plcCmdInfo.getPlcId());
|
|
|
|
|
Integer integer = cameraId.equals(street.getCamera1Id()) ? street.getCamera2Id() : street.getCamera1Id();
|
|
|
|
|
return integer;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Integer getCameraByPlcCmd(PlcCmdInfo plcCmdInfo,Integer leftRight){
|
|
|
|
|
Street street = streetService.getStreetByPlcId(plcCmdInfo.getPlcId());
|
|
|
|
|
//判断单双伸 type=0 单伸 1为双伸
|
|
|
|
|
@ -592,7 +608,6 @@ public class PlcService {
|
|
|
|
|
lightSources.forEach(lightSource -> {
|
|
|
|
|
HikControlSocket.openLight(lightSource.getIp(),lightSource.getPort(),configProperties.getLightSource().getIndex(),1);
|
|
|
|
|
});
|
|
|
|
|
Integer cameraId = getCameraByPlcCmd(plcCmdInfo,plcCmdInfo.getLeftRight1());
|
|
|
|
|
|
|
|
|
|
//重庆亚士创能盘点时先用同侧相机拍摄货物顶部
|
|
|
|
|
Integer leftRightTop = plcCmdInfo.getLeftRight1() == 1 ? 2 : 1;
|
|
|
|
|
@ -603,6 +618,7 @@ public class PlcService {
|
|
|
|
|
cameraCmdCode = cmdCode + "-" + plcCmdInfo.getLeftRightStr(1) + "-IN";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Integer cameraId = getCameraByPlcCmd(plcCmdInfo,plcCmdInfo.getLeftRight1(),cameraIdTop);
|
|
|
|
|
log.info("1 camera ptz:"+cameraCmdCode);
|
|
|
|
|
gyrateCameraByCode(cameraIdTop, cameraCmdCode);
|
|
|
|
|
try {
|
|
|
|
|
|