Browse Source

rev 抓取站点修改

master
周俊杰 1 year ago
parent
commit
1670f15446
  1. 33
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_package_pallet_manipulator/LnshPackagePalletManipulatorDeviceDriver.java
  2. 3
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_press/LnshPressDeviceDriver.java
  3. 7
      acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_package_pallet_manipulator.vue

33
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_package_pallet_manipulator/LnshPackagePalletManipulatorDeviceDriver.java

@ -243,14 +243,15 @@ public class LnshPackagePalletManipulatorDeviceDriver extends AbstractOpcDeviceD
logServer.deviceExecuteLog(this.device_code,"","","信号Wthickness:" + last_Wthickness + " -> " + Wthickness);
}
if(grab_station != last_grab_station){
if(grab_station>0) {
GrabPlaceStationRequest request = new GrabPlaceStationRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(RequestMethodEnum.apply_get_put_station.getCode());
request.setRequest_medthod_name(RequestMethodEnum.apply_get_put_station.getName());
List<String> getDeviceCodeList = this.getExtraDeviceCodes("link_get_station");
List<String> putDeviceCodeList = this.getExtraDeviceCodes("link_put_station");
request.setGet_station(getDeviceCodeList.get(grab_station));
request.setPut_station(putDeviceCodeList.get(place_station));
request.setGet_station(getDeviceCodeList.get((grab_station)-1));
request.setPut_station(putDeviceCodeList.get((place_station)-1));
Device getDevice = deviceAppService.findDeviceByCode(getDeviceCodeList.get(grab_station).toString());
Device putDevice = deviceAppService.findDeviceByCode(putDeviceCodeList.get(place_station).toString());
@ -262,12 +263,12 @@ public class LnshPackagePalletManipulatorDeviceDriver extends AbstractOpcDeviceD
}
LnshPalletizingManipulatorSiteDeviceDriver lnshPalletizingManipulatorSiteDeviceDriver;
if(getDevice.getDeviceDriver() instanceof LnshPalletizingManipulatorSiteDeviceDriver){
if (getDevice.getDeviceDriver() instanceof LnshPalletizingManipulatorSiteDeviceDriver) {
lnshPalletizingManipulatorSiteDeviceDriver = (LnshPalletizingManipulatorSiteDeviceDriver) getDevice.getDeviceDriver();
request.setGet_station_vehicle_code(String.valueOf(lnshPalletizingManipulatorSiteDeviceDriver.getBarcode()));
request.setGet_station_qty(String.valueOf(lnshPalletizingManipulatorSiteDeviceDriver.getEncoder_qty()));
}
if(putDevice.getDeviceDriver() instanceof LnshPalletizingManipulatorSiteDeviceDriver){
if (putDevice.getDeviceDriver() instanceof LnshPalletizingManipulatorSiteDeviceDriver) {
lnshPalletizingManipulatorSiteDeviceDriver = (LnshPalletizingManipulatorSiteDeviceDriver) putDevice.getDeviceDriver();
request.setPut_station_vehicle_code(String.valueOf(lnshPalletizingManipulatorSiteDeviceDriver.getBarcode()));
request.setPut_station_qty(String.valueOf(lnshPalletizingManipulatorSiteDeviceDriver.getEncoder_qty()));
@ -278,20 +279,25 @@ public class LnshPackagePalletManipulatorDeviceDriver extends AbstractOpcDeviceD
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
message = RequestMethodEnum.getName("apply_get_put_station") + "apply_get_put_station 接口请求成功" + resp.getMessage();;
message = RequestMethodEnum.getName("apply_get_put_station") + "apply_get_put_station 接口请求成功" + resp.getMessage();
;
} else {
message = RequestMethodEnum.getName("apply_get_put_station") + "apply_get_put_station 接口请求失败" + resp.getMessage();;
message = RequestMethodEnum.getName("apply_get_put_station") + "apply_get_put_station 接口请求失败" + resp.getMessage();
;
}
}
}
if(place_station != last_place_station){
if(place_station>0) {
GrabPlaceStationRequest request = new GrabPlaceStationRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(RequestMethodEnum.apply_get_put_station.getCode());
request.setRequest_medthod_name(RequestMethodEnum.apply_get_put_station.getName());
List<String> getDeviceCodeList = this.getExtraDeviceCodes("link_get_station");
List<String> putDeviceCodeList = this.getExtraDeviceCodes("link_put_station");
request.setGet_station(getDeviceCodeList.get(grab_station));
request.setPut_station(putDeviceCodeList.get(place_station));
request.setGet_station(getDeviceCodeList.get((grab_station)-1));
request.setPut_station(putDeviceCodeList.get((place_station)-1));
Device getDevice = deviceAppService.findDeviceByCode(getDeviceCodeList.get(grab_station).toString());
Device putDevice = deviceAppService.findDeviceByCode(putDeviceCodeList.get(place_station).toString());
@ -303,12 +309,12 @@ public class LnshPackagePalletManipulatorDeviceDriver extends AbstractOpcDeviceD
}
LnshPalletizingManipulatorSiteDeviceDriver lnshPalletizingManipulatorSiteDeviceDriver;
if(getDevice.getDeviceDriver() instanceof LnshPalletizingManipulatorSiteDeviceDriver){
if (getDevice.getDeviceDriver() instanceof LnshPalletizingManipulatorSiteDeviceDriver) {
lnshPalletizingManipulatorSiteDeviceDriver = (LnshPalletizingManipulatorSiteDeviceDriver) getDevice.getDeviceDriver();
request.setGet_station_vehicle_code(String.valueOf(lnshPalletizingManipulatorSiteDeviceDriver.getBarcode()));
request.setGet_station_qty(String.valueOf(lnshPalletizingManipulatorSiteDeviceDriver.getEncoder_qty()));
}
if(putDevice.getDeviceDriver() instanceof LnshPalletizingManipulatorSiteDeviceDriver){
if (putDevice.getDeviceDriver() instanceof LnshPalletizingManipulatorSiteDeviceDriver) {
lnshPalletizingManipulatorSiteDeviceDriver = (LnshPalletizingManipulatorSiteDeviceDriver) putDevice.getDeviceDriver();
request.setPut_station_vehicle_code(String.valueOf(lnshPalletizingManipulatorSiteDeviceDriver.getBarcode()));
request.setPut_station_qty(String.valueOf(lnshPalletizingManipulatorSiteDeviceDriver.getEncoder_qty()));
@ -319,9 +325,12 @@ public class LnshPackagePalletManipulatorDeviceDriver extends AbstractOpcDeviceD
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
message = RequestMethodEnum.getName("apply_get_put_station") + "apply_get_put_station 接口请求成功" + resp.getMessage();;
message = RequestMethodEnum.getName("apply_get_put_station") + "apply_get_put_station 接口请求成功" + resp.getMessage();
;
} else {
message = RequestMethodEnum.getName("apply_get_put_station") + "apply_get_put_station 接口请求失败" + resp.getMessage();;
message = RequestMethodEnum.getName("apply_get_put_station") + "apply_get_put_station 接口请求失败" + resp.getMessage();
;
}
}
}

3
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_press/LnshPressDeviceDriver.java

@ -309,7 +309,10 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De
message = RequestMethodEnum.getName("order_verify") + "order_verify 接口请求失败" + resp.getMessage();
}
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
}else{
log.info("排产单不正确:{}",order_No);
}
return true;
}

7
acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_package_pallet_manipulator.vue

@ -483,6 +483,13 @@ export default {
}
this.data1 = data.rs
this.data2 = data.ws
if (data.modeform) {
const arr = Object.keys(data.modeform)
//
if (arr.length > 0) {
this.modeform.tableData = data.modeform
}
}
this.sliceItem()
})
selectPlcList().then(data => {

Loading…
Cancel
Save