Browse Source

rev 接口测试

master
汪菘 2 years ago
parent
commit
120f48a0c5
  1. 2
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/RequestMethodEnum.java
  2. 4
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/converor_barcode/ConveyorBarcodeDefination.java
  3. 126
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/converor_barcode/ConveyorBarcodeDeviceDriver.java
  4. 4
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/converor_barcode/ItemProtocol.java
  5. 114
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/conveyor_press_station/ConveyorPressStationDeviceDriver.java
  6. 2
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_Laminating_machine/LnshLaminatingMachineDeviceDriver.java
  7. 4
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_fold_disc_site/LnshFoldDiscSiteDeviceDriver.java
  8. 11
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_mixing_mill/LnshMixingMillDeviceDriver.java
  9. 4
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_package_line/LnshPackageLineDeviceDriver.java
  10. 8
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/LnshPalletizingManipulatorDeviceDriver.java
  11. 506
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator_site/LnshPalletizingManipulatorSiteDeviceDriver.java
  12. 13
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_press/LnshPressDeviceDriver.java
  13. 10
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_split_manipulator/LnshSplitManipulatorDeviceDriver.java
  14. 110
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java
  15. 5
      acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/data/AcsToWmsData/applyTask/ApplyTaskRequest.java
  16. 8
      acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/data/AcsToWmsData/applyTask/ApplyTaskResponse.java
  17. 2
      acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/AcsToWmsService.java
  18. 4
      acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java
  19. 202
      acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java
  20. 2
      acs/nladmin-ui/src/views/acs/device/driver/agv/agv_ndc_one.vue
  21. 2
      acs/nladmin-ui/src/views/acs/device/driver/agv/agv_ndc_two.vue
  22. 2
      acs/nladmin-ui/src/views/acs/device/driver/cargo_lift_conveyor.vue
  23. 2
      acs/nladmin-ui/src/views/acs/device/driver/empty_vehicle_stacking_position.vue
  24. 2
      acs/nladmin-ui/src/views/acs/device/driver/hailiang_smart_plc_test.vue
  25. 2
      acs/nladmin-ui/src/views/acs/device/driver/haokai_auto_conveyor.vue
  26. 2
      acs/nladmin-ui/src/views/acs/device/driver/lamp_three_color.vue
  27. 2
      acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_Laminating_machine.vue
  28. 2
      acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_crusher.vue
  29. 2
      acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_fold_disc_site.vue
  30. 2
      acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_kiln_lane.vue
  31. 2
      acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_kiln_truss.vue
  32. 2
      acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_labeling_machine.vue
  33. 2
      acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_out_kiln_truss.vue
  34. 2
      acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_package_line.vue
  35. 2
      acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_package_pallet_manipulator.vue
  36. 2
      acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_package_site.vue
  37. 2
      acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_pallet_storage.vue
  38. 2
      acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_palletizing_manipulator.vue
  39. 2
      acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_palletizing_manipulator_site.vue
  40. 2
      acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_rgv.vue
  41. 2
      acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_split_manipulator.vue
  42. 19
      acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_station.vue
  43. 2
      acs/nladmin-ui/src/views/acs/device/driver/paint_conveyor.vue
  44. 2
      acs/nladmin-ui/src/views/acs/device/driver/standard_conveyor_control.vue
  45. 2
      acs/nladmin-ui/src/views/acs/device/driver/standard_conveyor_control_with_scanner.vue
  46. 2
      acs/nladmin-ui/src/views/acs/device/driver/standard_conveyor_monitor.vue
  47. 2
      acs/nladmin-ui/src/views/acs/device/driver/standard_inspect_site.vue
  48. 2
      acs/nladmin-ui/src/views/acs/device/driver/standard_scanner.vue
  49. 2
      acs/nladmin-ui/src/views/acs/device/driver/standard_storage.vue

2
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/RequestMethodEnum.java

@ -26,7 +26,7 @@ public enum RequestMethodEnum {
apply_force_take_full_vehicle_in_storage(8, "apply_force_take_full_vehicle_in_storage", "申请强制满托入缓存","0"),
barcode_sucess_apply(9, "barcode_sucess_apply", "扫码成功申请","0"),
barcode_sucess_apply(9, "barcode_success_apply", "扫码成功申请","0"),
get_vehicle_info(10, "get_vehicle_info", "获取组盘信息","0"),

4
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/converor_barcode/ConveyorBarcodeDefination.java

@ -33,13 +33,13 @@ public class ConveyorBarcodeDefination implements OpcDeviceDriverDefination {
@Override
public DeviceDriver getDriverInstance(Device device) {
return (new LnshStationDeviceDriver()).setDevice(device).setDriverDefination(this);
return (new ConveyorBarcodeDeviceDriver()).setDevice(device).setDriverDefination(this);
}
@Override
public Class<? extends DeviceDriver> getDeviceDriverType() {
return LnshStationDeviceDriver.class;
return ConveyorBarcodeDeviceDriver.class;
}
@Override

126
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/converor_barcode/LnshStationDeviceDriver.java → acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/converor_barcode/ConveyorBarcodeDeviceDriver.java

@ -16,7 +16,10 @@ import org.nl.acs.device_driver.RouteableDeviceDriver;
import org.nl.acs.device_driver.StandardRequestMethod;
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.device_driver.lnsh.lnsh_Laminating_machine.LnshLaminatingMachineDeviceDriver;
import org.nl.acs.device_driver.lnsh.lnsh_mixing_mill.LnshMixingMillDeviceDriver;
import org.nl.acs.ext.wms.data.AcsToWmsData.applyTask.ApplyTaskRequest;
import org.nl.acs.ext.wms.data.AcsToWmsData.applyTask.ApplyTaskResponse;
import org.nl.acs.ext.wms.data.Resp;
import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.instruction.service.InstructionService;
@ -24,6 +27,7 @@ import org.nl.acs.instruction.service.dto.Instruction;
import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.acs.monitor.DeviceStageMonitor;
import org.nl.acs.opc.Device;
import org.nl.acs.opc.DeviceAppService;
import org.nl.acs.route.service.RouteLineService;
import org.nl.acs.task.service.TaskService;
import org.nl.modules.lucene.service.LuceneExecuteLogService;
@ -44,7 +48,7 @@ import java.util.Map;
@Getter
@Setter
@RequiredArgsConstructor
public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor, StandardRequestMethod {
public class ConveyorBarcodeDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor, StandardRequestMethod {
protected ItemProtocol itemProtocol = new ItemProtocol(this);
LuceneExecuteLogService lucene = SpringContextHolder.getBean("luceneExecuteLogServiceImpl");
@ -61,6 +65,8 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
AcsToWmsService acsToWmsService = SpringContextHolder.getBean("acsToWmsServiceImpl");
DeviceAppService deviceAppService = SpringContextHolder.getBean("deviceAppServiceImpl");
String device_code;
int mode = 0;
int error = 0;
@ -202,7 +208,7 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
List toInstructions;
if (mode > 2) {
if (mode > 2 && !requireSucess) {
if (ObjectUtil.isNotEmpty(this.device.getExtraValue().get(String.valueOf(mode)))) {
String modethod = this.device.getExtraValue().get(String.valueOf(mode)).toString();
try {
@ -485,9 +491,10 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
request.setVehicle_code(String.valueOf(barcode));
message = RequestMethodEnum.getName("apply_put_full_vehicle") + "apply_put_full_vehicle 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -511,16 +518,17 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
if(move == 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("apply_put_empty_vehicle") + "apply_put_empty_vehicle 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -543,16 +551,17 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
if(move == 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("apply_take_empty_vehicle") + "apply_take_empty_vehicle 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -576,16 +585,30 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
if(ObjectUtil.isNotEmpty(this.getDevice().getExtraValue().get("link_device_code"))){
Device device = deviceAppService.findDeviceByCode(this.getDevice().getExtraValue().get("link_device_code").toString());
if(ObjectUtil.isNotEmpty(device)){
LnshMixingMillDeviceDriver lnshMixingMillDeviceDriver;
if(device.getDeviceDriver() instanceof LnshMixingMillDeviceDriver){
lnshMixingMillDeviceDriver = (LnshMixingMillDeviceDriver) device.getDeviceDriver();
request.setMix_mum(String.valueOf(lnshMixingMillDeviceDriver.getMix_num()));
}
}
}
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("apply_take_full_vehicle") + "apply_take_full_vehicle 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -599,6 +622,23 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
}
}
public void writing(String param, String value) {
String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
+ "." + param;
String opcservcerid = this.getDevice().getOpc_server_id();
Server server = ReadUtil.getServer(opcservcerid);
Map<String, Object> itemMap = new HashMap<String, Object>();
if (value instanceof String) {
itemMap.put(to_param, value);
} else {
itemMap.put(to_param, value);
}
ReadUtil.write(itemMap, server);
server.disconnect();
logServer.deviceExecuteLog(this.device_code, "", "", param + " 写入 " + value);
}
/**
* 申请强制取走满料盅托盘
*
@ -608,16 +648,17 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("apply_force_take_full_vehicle") + "apply_force_take_full_vehicle 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -640,16 +681,17 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("apply_force_take_full_vehicle_in_storage") + "apply_force_take_full_vehicle_in_storage 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -672,16 +714,17 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("barcode_sucess_apply") + "barcode_sucess_apply 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -704,16 +747,17 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("get_vehicle_info") + "get_vehicle_info 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -735,16 +779,17 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("force_no_package") + "force_no_package 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -766,16 +811,17 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("apply_labelling") + "apply_labelling 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);

4
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/converor_barcode/ItemProtocol.java

@ -32,9 +32,9 @@ public class ItemProtocol {
Boolean isonline;
private LnshStationDeviceDriver driver;
private ConveyorBarcodeDeviceDriver driver;
public ItemProtocol(LnshStationDeviceDriver driver) {
public ItemProtocol(ConveyorBarcodeDeviceDriver driver) {
this.driver = driver;
}

114
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/conveyor_press_station/ConveyorPressStationDeviceDriver.java

@ -17,6 +17,7 @@ import org.nl.acs.device_driver.StandardRequestMethod;
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.ext.wms.data.AcsToWmsData.applyTask.ApplyTaskRequest;
import org.nl.acs.ext.wms.data.AcsToWmsData.applyTask.ApplyTaskResponse;
import org.nl.acs.ext.wms.data.Resp;
import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.instruction.service.InstructionService;
@ -202,7 +203,7 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
List toInstructions;
if (mode > 2) {
if (mode > 2 && !requireSucess) {
if (ObjectUtil.isNotEmpty(this.device.getExtraValue().get(String.valueOf(mode)))) {
String modethod = this.device.getExtraValue().get(String.valueOf(mode)).toString();
try {
@ -248,6 +249,25 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
return true;
}
public void writing(String param, String value) {
String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
+ "." + param;
String opcservcerid = this.getDevice().getOpc_server_id();
Server server = ReadUtil.getServer(opcservcerid);
Map<String, Object> itemMap = new HashMap<String, Object>();
if (value instanceof String) {
itemMap.put(to_param, value);
} else {
itemMap.put(to_param, value);
}
ReadUtil.write(itemMap, server);
server.disconnect();
logServer.deviceExecuteLog(this.device_code, "", "", param + " 写入 " + value);
}
protected void executing(Instruction instruction) {
this.executing(1, instruction, "");
}
@ -485,9 +505,10 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
request.setVehicle_code(String.valueOf(barcode));
message = RequestMethodEnum.getName("apply_put_full_vehicle") + "apply_put_full_vehicle 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -511,16 +532,17 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
if(move == 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("apply_put_empty_vehicle") + "apply_put_empty_vehicle 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -540,19 +562,20 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
* @param
*/
public synchronized boolean apply_take_empty_vehicle() {
if(move == 0) {
if(move == 1) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("apply_take_empty_vehicle") + "apply_take_empty_vehicle 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -576,16 +599,17 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("apply_take_full_vehicle") + "apply_take_full_vehicle 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -608,16 +632,17 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("apply_force_take_full_vehicle") + "apply_force_take_full_vehicle 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -640,16 +665,17 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("apply_force_take_full_vehicle_in_storage") + "apply_force_take_full_vehicle_in_storage 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -668,20 +694,23 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
*
* @param
*/
public synchronized boolean barcode_sucess_apply() {
public synchronized boolean barcode_success_apply() {
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("barcode_sucess_apply") + "barcode_sucess_apply 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.writing("to_command",resp.getIs_standing_finish());
this.writing("to_mix_num",resp.getMix_num());
this.setRequireSucess(true);
} else {
this.writing(400);
@ -704,16 +733,17 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("get_vehicle_info") + "get_vehicle_info 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -735,16 +765,17 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("force_no_package") + "force_no_package 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -766,16 +797,17 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("apply_labelling") + "apply_labelling 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);

2
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_Laminating_machine/LnshLaminatingMachineDeviceDriver.java

@ -251,7 +251,7 @@ public class LnshLaminatingMachineDeviceDriver extends AbstractOpcDeviceDriver i
if (jo.getInteger("status") == 200) {
String vehicle_code = jo.getString("vehicle_code");
this.writing("to_barcode", vehicle_code);
this.writing(this.mode);
this.writing(200);
requireSucess = true;
}

4
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_fold_disc_site/LnshFoldDiscSiteDeviceDriver.java

@ -235,7 +235,7 @@ public class LnshFoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implem
if (result.getStatus() == HttpStatus.OK.value()) {
JSONObject jsonObject = JSONObject.parseObject(result.body());
if (ObjectUtil.isNotEmpty(jsonObject) && "200".equals(jsonObject.getString("status"))) {
this.writing(this.mode);
this.writing(200);
requireSucess = true;
}
}
@ -301,7 +301,7 @@ public class LnshFoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implem
if (result.getStatus() == HttpStatus.OK.value()) {
JSONObject jsonObject = JSONObject.parseObject(result.body());
if (ObjectUtil.isNotEmpty(jsonObject) && "200".equals(jsonObject.getString("status"))) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
}
}

11
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_mixing_mill/LnshMixingMillDeviceDriver.java

@ -16,6 +16,7 @@ import org.nl.acs.device_driver.RouteableDeviceDriver;
import org.nl.acs.device_driver.StandardRequestMethod;
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.ext.wms.data.AcsToWmsData.applyTask.ApplyTaskResponse;
import org.nl.acs.ext.wms.data.Resp;
import org.nl.acs.ext.wms.data.AcsToWmsData.applyTask.ApplyTaskRequest;
import org.nl.acs.ext.wms.service.AcsToWmsService;
@ -396,9 +397,10 @@ public class LnshMixingMillDeviceDriver extends AbstractOpcDeviceDriver implemen
request.setOrder_code(this.getOrder_No());
message = RequestMethodEnum.getName("order_verify") + "order_verify 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -418,9 +420,10 @@ public class LnshMixingMillDeviceDriver extends AbstractOpcDeviceDriver implemen
request.setOrder_code(this.getOrder_No());
message = RequestMethodEnum.getName("order_finish") + "order_finish 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);

4
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_package_line/LnshPackageLineDeviceDriver.java

@ -345,8 +345,8 @@ public class LnshPackageLineDeviceDriver extends AbstractOpcDeviceDriver impleme
this.writing("to_brick_type", data.getString("brick_type"));
this.writing("to_brick_type", data.getString("brick_type"));
this.writing(this.mode);
this.writing(this.mode);
this.writing(200);
this.writing(200);
this.setRequireSucess(true);
}

8
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator/LnshPalletizingManipulatorDeviceDriver.java

@ -16,6 +16,7 @@ import org.nl.acs.device_driver.RouteableDeviceDriver;
import org.nl.acs.device_driver.StandardRequestMethod;
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.ext.wms.data.AcsToWmsData.applyTask.ApplyTaskResponse;
import org.nl.acs.ext.wms.data.Resp;
import org.nl.acs.ext.wms.data.AcsToWmsData.applyTask.ApplyTaskRequest;
import org.nl.acs.ext.wms.data.AcsToWmsData.grab.GrabRequest;
@ -375,9 +376,10 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri
request.setUnqualified_qty(unqualified_qty);
message = RequestMethodEnum.getName("apply_one_grab") + "apply_one_grab 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -467,7 +469,7 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri
String two_qty = content.getString("two_qty");
String tool_coordinate = content.getString("tool_coordinate");
this.writing(this.mode);
this.writing(200);
this.writing("to_materialQty", qty);
this.writing("to_material_code", material_code);
this.writing("to_AlongSide", AlongSide);

506
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_palletizing_manipulator_site/LnshPalletizingManipulatorSiteDeviceDriver.java

@ -4,6 +4,7 @@ import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpResponse;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import lombok.Getter;
import lombok.Setter;
@ -18,6 +19,8 @@ import org.nl.acs.device_driver.RouteableDeviceDriver;
import org.nl.acs.device_driver.StandardRequestMethod;
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.device_driver.lnsh.lnsh_mixing_mill.LnshMixingMillDeviceDriver;
import org.nl.acs.ext.wms.data.AcsToWmsData.applyTask.ApplyTaskResponse;
import org.nl.acs.ext.wms.data.Resp;
import org.nl.acs.ext.wms.data.AcsToWmsData.applyTask.ApplyTaskRequest;
import org.nl.acs.ext.wms.service.AcsToWmsService;
@ -26,10 +29,12 @@ import org.nl.acs.instruction.service.dto.Instruction;
import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.acs.monitor.DeviceStageMonitor;
import org.nl.acs.opc.Device;
import org.nl.acs.opc.DeviceAppService;
import org.nl.acs.order.service.ProduceshiftorderService;
import org.nl.acs.route.service.RouteLineService;
import org.nl.acs.task.service.TaskService;
import org.nl.modules.lucene.service.LuceneExecuteLogService;
import org.nl.modules.lucene.service.dto.LuceneLogDto;
import org.nl.modules.wql.util.SpringContextHolder;
import org.openscada.opc.lib.da.Server;
import org.springframework.http.HttpStatus;
@ -66,6 +71,9 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
ProduceshiftorderService produceshiftorderService = SpringContextHolder.getBean("produceshiftorderServiceImpl");
DeviceAppService deviceAppService = SpringContextHolder.getBean("deviceAppServiceImpl");
String device_code;
int mode = 0;
int error = 0;
@ -587,9 +595,6 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
return;
}
//急停
if (this.isStop()) {
//未在线无心跳
if (mode == 0) {
this.setIsonline(false);
@ -609,7 +614,7 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
List toInstructions;
if (mode > 2) {
if (mode > 2 && !requireSucess) {
if (ObjectUtil.isNotEmpty(this.device.getExtraValue().get(String.valueOf(mode)))) {
String modethod = this.device.getExtraValue().get(String.valueOf(mode)).toString();
try {
@ -696,7 +701,7 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
last_pressLayerY3_offset = pressLayerY3_offset;
last_tool_coordinate = tool_coordinate;
}
}
/**
* 请求
@ -718,238 +723,177 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
}
}
/**
* 码垛完成
* 申请取走满料盅托盘
* 申请补满料盅托盘
*
* @param
*/
public synchronized boolean apply_take_full_vehicle() {
JSONObject json = new JSONObject();
json.put("type", "1");
json.put("device_code", device_code);
json.put("qty", encoder_qty);
json.put("weight", weight);
json.put("vehicle_code", barcode);
json.put("is_full", "1");
json.put("is_package", "1");
json.put("product_code", product_code);
json.put("AlongSide", AlongSide);
json.put("BshortSide", BshortSide);
json.put("Htrapezoidal", Htrapezoidal);
json.put("Wthickness", Wthickness);
json.put("tray_qty", tray_qty);
json.put("tray_high", tray_high);
json.put("crib_category", crib_category);
json.put("palletX1_line", palletX1_line);
json.put("palletY1_row", palletY1_row);
json.put("palletA1_angle", palletA1_angle);
json.put("palletX2_line", palletX2_line);
json.put("palletY2_row", palletY2_row);
json.put("palletA2_angle", palletA2_angle);
json.put("palletX3_line", palletX3_line);
json.put("palletY3_row", palletY3_row);
json.put("palletA3_angle", palletA3_angle);
json.put("pressCribX1_line", pressCribX1_line);
json.put("pressCribY1_row", pressCribY1_row);
json.put("pressCribA1_angle", pressCribA1_angle);
json.put("pressCribX2_line", pressCribX2_line);
json.put("pressCribY2_row", pressCribY2_row);
json.put("pressCribA2_angle", pressCribA2_angle);
json.put("pressCribX3_line", pressCribX3_line);
json.put("pressCribY3_row", pressCribY3_row);
json.put("pressCribA3_angle", pressCribA3_angle);
json.put("Zoffset", Zoffset);
json.put("pallet_layerQty", pallet_layerQty);
json.put("pressCrib_layerQty", pressCrib_layerQty);
json.put("codeLayerX1_interval", codeLayerX1_interval);
json.put("codeLayerY1_interval", codeLayerY1_interval);
json.put("codeLayerX2_interval", codeLayerX2_interval);
json.put("codeLayerY2_interval", codeLayerY2_interval);
json.put("codeLayerX3_interval", codeLayerX3_interval);
json.put("codeLayerY3_interval", codeLayerY3_interval);
json.put("codeLayerX1_offset", codeLayerX1_offset);
json.put("codeLayerY1_offset", codeLayerY1_offset);
json.put("codeLayerX2_offset", codeLayerX2_offset);
json.put("codeLayerY2_offset", codeLayerY2_offset);
json.put("codeLayerX3_offset", codeLayerX3_offset);
json.put("codeLayerY3_offset", codeLayerY3_offset);
json.put("pressLayerX1_interval", pressLayerX1_interval);
json.put("pressLayerY1_interval", pressLayerY1_interval);
json.put("pressLayerX2_interval", pressLayerX2_interval);
json.put("pressLayerY2_interval", pressLayerY2_interval);
json.put("pressLayerX3_interval", pressLayerX3_interval);
json.put("pressLayerY3_interval", pressLayerY3_interval);
json.put("pressLayerX1_offset", pressLayerX1_offset);
json.put("pressLayerY1_offset", pressLayerY1_offset);
json.put("pressLayerX2_offset", pressLayerX2_offset);
json.put("pressLayerY2_offset", pressLayerY2_offset);
json.put("pressLayerX3_offset", pressLayerX3_offset);
json.put("pressLayerY3_offset", pressLayerY3_offset);
json.put("tool_coordinate", tool_coordinate);
HttpResponse result = acsToWmsService.applyTaskManipulatorToWms(json);
if (ObjectUtil.isNotEmpty(result)) {
if (result.getStatus() == HttpStatus.OK.value()) {
JSONObject jsonObject = JSONObject.parseObject(result.body());
if (ObjectUtil.isNotEmpty(jsonObject) && "200".equals(jsonObject.getString("status"))) {
this.writing(this.mode);
public synchronized boolean apply_put_full_vehicle() {
if(move == 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
message = RequestMethodEnum.getName("apply_put_full_vehicle") + "apply_put_full_vehicle 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
if (resp.getCode() == 200) {
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
message = RequestMethodEnum.getName("apply_put_full_vehicle") + "apply_put_full_vehicle 接口请求失败" + resp.getMessage();;
}
}
}
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
return true;
} else {
message = RequestMethodEnum.getName("apply_put_full_vehicle") + "apply_put_full_vehicle 设备有货未请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
return false;
}
}
/**
* 码垛强制完成
* 申请强制取走满料盅托盘
* 申请补空料盅托盘
*
* @param
*/
public synchronized boolean apply_force_take_full_vehicle() {
JSONObject json = new JSONObject();
json.put("type", "1");
json.put("device_code", device_code);
json.put("qty", encoder_qty);
json.put("weight", weight);
json.put("vehicle_code", barcode);
json.put("is_full", "0");
json.put("is_package", "1");
json.put("product_code", product_code);
json.put("AlongSide", AlongSide);
json.put("BshortSide", BshortSide);
json.put("Htrapezoidal", Htrapezoidal);
json.put("Wthickness", Wthickness);
json.put("tray_qty", tray_qty);
json.put("tray_high", tray_high);
json.put("crib_category", crib_category);
json.put("palletX1_line", palletX1_line);
json.put("palletY1_row", palletY1_row);
json.put("palletA1_angle", palletA1_angle);
json.put("palletX2_line", palletX2_line);
json.put("palletY2_row", palletY2_row);
json.put("palletA2_angle", palletA2_angle);
json.put("palletX3_line", palletX3_line);
json.put("palletY3_row", palletY3_row);
json.put("palletA3_angle", palletA3_angle);
json.put("pressCribX1_line", pressCribX1_line);
json.put("pressCribY1_row", pressCribY1_row);
json.put("pressCribA1_angle", pressCribA1_angle);
json.put("pressCribX2_line", pressCribX2_line);
json.put("pressCribY2_row", pressCribY2_row);
json.put("pressCribA2_angle", pressCribA2_angle);
json.put("pressCribX3_line", pressCribX3_line);
json.put("pressCribY3_row", pressCribY3_row);
json.put("pressCribA3_angle", pressCribA3_angle);
json.put("Zoffset", Zoffset);
json.put("pallet_layerQty", pallet_layerQty);
json.put("pressCrib_layerQty", pressCrib_layerQty);
json.put("codeLayerX1_interval", codeLayerX1_interval);
json.put("codeLayerY1_interval", codeLayerY1_interval);
json.put("codeLayerX2_interval", codeLayerX2_interval);
json.put("codeLayerY2_interval", codeLayerY2_interval);
json.put("codeLayerX3_interval", codeLayerX3_interval);
json.put("codeLayerY3_interval", codeLayerY3_interval);
json.put("codeLayerX1_offset", codeLayerX1_offset);
json.put("codeLayerY1_offset", codeLayerY1_offset);
json.put("codeLayerX2_offset", codeLayerX2_offset);
json.put("codeLayerY2_offset", codeLayerY2_offset);
json.put("codeLayerX3_offset", codeLayerX3_offset);
json.put("codeLayerY3_offset", codeLayerY3_offset);
json.put("pressLayerX1_interval", pressLayerX1_interval);
json.put("pressLayerY1_interval", pressLayerY1_interval);
json.put("pressLayerX2_interval", pressLayerX2_interval);
json.put("pressLayerY2_interval", pressLayerY2_interval);
json.put("pressLayerX3_interval", pressLayerX3_interval);
json.put("pressLayerY3_interval", pressLayerY3_interval);
json.put("pressLayerX1_offset", pressLayerX1_offset);
json.put("pressLayerY1_offset", pressLayerY1_offset);
json.put("pressLayerX2_offset", pressLayerX2_offset);
json.put("pressLayerY2_offset", pressLayerY2_offset);
json.put("pressLayerX3_offset", pressLayerX3_offset);
json.put("pressLayerY3_offset", pressLayerY3_offset);
json.put("tool_coordinate", tool_coordinate);
HttpResponse result = acsToWmsService.applyTaskManipulatorToWms(json);
if (ObjectUtil.isNotEmpty(result)) {
if (result.getStatus() == HttpStatus.OK.value()) {
JSONObject jsonObject = JSONObject.parseObject(result.body());
if (ObjectUtil.isNotEmpty(jsonObject) && "200".equals(jsonObject.getString("status"))) {
this.writing(this.mode);
public synchronized boolean apply_put_empty_vehicle() {
if(move == 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("apply_put_empty_vehicle") + "apply_put_empty_vehicle 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(200);
this.setRequireSucess(true);
}
}
} else {
this.writing(400);
message = RequestMethodEnum.getName("apply_put_empty_vehicle") + "apply_put_empty_vehicle 接口请求失败" + resp.getMessage();;
}
return true;
} else {
message = RequestMethodEnum.getName("apply_put_empty_vehicle") + "apply_put_empty_vehicle 设备有货未请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
return false;
}
}
/**
* 申请补满料盅托盘
* 申请取走空料盅托盘
*
* @param
*/
public synchronized boolean apply_put_full_vehicle() {
JSONObject json = new JSONObject();
json.put("device_code", this.device_code);
json.put("type", "2");
json.put("qty", weight);
json.put("vehicle_code", barcode);
json.put("is_full", "1");
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
if (ObjectUtil.isNotEmpty(result)) {
if (result.getStatus() == HttpStatus.OK.value()) {
JSONObject jsonObject = JSONObject.parseObject(result.body());
if (ObjectUtil.isNotEmpty(jsonObject) && "200".equals(jsonObject.getString("status"))) {
this.writing(this.mode);
public synchronized boolean apply_take_empty_vehicle() {
if(move == 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("apply_take_empty_vehicle") + "apply_take_empty_vehicle 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(200);
this.setRequireSucess(true);
}
}
} else {
this.writing(400);
message = RequestMethodEnum.getName("apply_take_empty_vehicle") + "apply_take_empty_vehicle 接口请求失败" + resp.getMessage();;
}
return true;
} else {
message = RequestMethodEnum.getName("apply_take_empty_vehicle") + "apply_take_empty_vehicle 设备有货未请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
return false;
}
}
/**
* 申请补空料盅托盘
* 申请取走满料盅托盘
*
* @param
*/
public synchronized boolean apply_put_empty_vehicle() {
public synchronized boolean apply_take_full_vehicle() {
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequestNo(IdUtil.simpleUUID());
request.setRequestDate(AgvUtil.getDate());
Resp resp = acsToWmsService.applyTask(request);
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setMaterial_code(material);
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
if(ObjectUtil.isNotEmpty(this.getDevice().getExtraValue().get("link_device_code"))){
Device device = deviceAppService.findDeviceByCode(this.getDevice().getExtraValue().get("link_device_code").toString());
if(ObjectUtil.isNotEmpty(device)){
LnshMixingMillDeviceDriver lnshMixingMillDeviceDriver;
if(device.getDeviceDriver() instanceof LnshMixingMillDeviceDriver){
lnshMixingMillDeviceDriver = (LnshMixingMillDeviceDriver) device.getDeviceDriver();
request.setMix_mum(String.valueOf(lnshMixingMillDeviceDriver.getMix_num()));
}
}
}
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("apply_take_full_vehicle") + "apply_take_full_vehicle 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
message = RequestMethodEnum.getName("apply_take_full_vehicle") + "apply_take_full_vehicle 接口请求失败" + resp.getMessage();;
}
return true;
} else {
message = RequestMethodEnum.getName("apply_take_full_vehicle") + "apply_take_full_vehicle 设备无货未请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
return false;
}
}
/**
* 申请取走空料盅托盘
* 申请强制取走满料盅托盘
*
* @param
*/
public synchronized boolean apply_take_empty_vehicle() {
JSONObject json = new JSONObject();
json.put("device_code", this.device_code);
json.put("type", "2");
json.put("is_full", "1");
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
if (ObjectUtil.isNotEmpty(result)) {
if (result.getStatus() == HttpStatus.OK.value()) {
JSONObject jsonObject = JSONObject.parseObject(result.body());
if (ObjectUtil.isNotEmpty(jsonObject) && "200".equals(jsonObject.getString("status"))) {
this.writing(this.mode);
public synchronized boolean apply_force_take_full_vehicle() {
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("apply_force_take_full_vehicle") + "apply_force_take_full_vehicle 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(200);
this.setRequireSucess(true);
}
}
} else {
this.writing(400);
message = RequestMethodEnum.getName("apply_force_take_full_vehicle") + "apply_force_take_full_vehicle 接口请求失败" + resp.getMessage();;
}
return true;
} else {
message = RequestMethodEnum.getName("apply_force_take_full_vehicle") + "apply_force_take_full_vehicle 设备无货未请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
return false;
}
}
/**
@ -958,23 +902,30 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
* @param
*/
public synchronized boolean apply_force_take_full_vehicle_in_storage() {
JSONObject json = new JSONObject();
json.put("device_code", this.device_code);
json.put("type", "1");
json.put("weight", weight);
json.put("vehicle_code", barcode);
json.put("is_full", "1");
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
if (ObjectUtil.isNotEmpty(result)) {
if (result.getStatus() == HttpStatus.OK.value()) {
JSONObject jsonObject = JSONObject.parseObject(result.body());
if (ObjectUtil.isNotEmpty(jsonObject) && "200".equals(jsonObject.getString("status"))) {
this.writing(this.mode);
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("apply_force_take_full_vehicle_in_storage") + "apply_force_take_full_vehicle_in_storage 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(200);
this.setRequireSucess(true);
}
}
} else {
this.writing(400);
message = RequestMethodEnum.getName("apply_force_take_full_vehicle_in_storage") + "apply_force_take_full_vehicle_in_storage 接口请求失败" + resp.getMessage();;
}
return true;
} else {
message = RequestMethodEnum.getName("apply_force_take_full_vehicle_in_storage") + "apply_force_take_full_vehicle_in_storage 设备无货未请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
return false;
}
}
/**
@ -983,25 +934,31 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
* @param
*/
public synchronized boolean barcode_sucess_apply() {
JSONObject json = new JSONObject();
json.put("device_code", this.device_code);
json.put("type", "1");
json.put("weight", weight);
json.put("vehicle_code", barcode);
json.put("is_full", "1");
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
if (ObjectUtil.isNotEmpty(result)) {
if (result.getStatus() == HttpStatus.OK.value()) {
JSONObject jsonObject = JSONObject.parseObject(result.body());
if (ObjectUtil.isNotEmpty(jsonObject) && "200".equals(jsonObject.getString("status"))) {
this.writing(this.mode);
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("barcode_sucess_apply") + "barcode_sucess_apply 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(200);
this.writing(resp.getIs_standing_finish(),"1");
this.setRequireSucess(true);
} else {
this.writing(400);
message = RequestMethodEnum.getName("barcode_sucess_apply") + "barcode_sucess_apply 接口请求失败" + resp.getMessage();;
}
}
}
return true;
} else {
message = RequestMethodEnum.getName("barcode_sucess_apply") + "barcode_sucess_apply 设备无货未请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
return false;
}
}
/**
@ -1010,24 +967,30 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
* @param
*/
public synchronized boolean get_vehicle_info() {
JSONObject json = new JSONObject();
json.put("device_code", this.device_code);
json.put("type", "1");
json.put("weight", weight);
json.put("vehicle_code", barcode);
json.put("is_full", "1");
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
if (ObjectUtil.isNotEmpty(result)) {
if (result.getStatus() == HttpStatus.OK.value()) {
JSONObject jsonObject = JSONObject.parseObject(result.body());
if (ObjectUtil.isNotEmpty(jsonObject) && "200".equals(jsonObject.getString("status"))) {
this.writing(this.mode);
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("get_vehicle_info") + "get_vehicle_info 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
message = RequestMethodEnum.getName("get_vehicle_info") + "get_vehicle_info 接口请求失败" + resp.getMessage();;
}
}
}
return true;
} else {
message = RequestMethodEnum.getName("get_vehicle_info") + "get_vehicle_info 设备无货未请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
return false;
}
}
@ -1035,21 +998,30 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
* 强制去包装-不包装
*/
public synchronized boolean force_no_package() {
JSONObject json = new JSONObject();
json.put("type", "5");
json.put("device_code", device_code);
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("force_no_package") + "force_no_package 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
if (ObjectUtil.isNotEmpty(result)) {
if (result.getStatus() == HttpStatus.OK.value()) {
JSONObject jsonObject = JSONObject.parseObject(result.body());
if (ObjectUtil.isNotEmpty(jsonObject) && "200".equals(jsonObject.getString("status"))) {
this.writing(this.mode);
if (resp.getCode() == 200) {
this.writing(200);
this.setRequireSucess(true);
}
}
} else {
this.writing(400);
message = RequestMethodEnum.getName("force_no_package") + "force_no_package 接口请求失败" + resp.getMessage();;
}
return true;
} else {
message = RequestMethodEnum.getName("force_no_package") + "force_no_package 设备无货未请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
return false;
}
}
@ -1057,23 +1029,31 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
* 申请贴标
*/
public synchronized boolean apply_labelling() {
JSONObject json = new JSONObject();
json.put("type", "5");
json.put("device_code", device_code);
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("apply_labelling") + "apply_labelling 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
if (ObjectUtil.isNotEmpty(result)) {
if (result.getStatus() == HttpStatus.OK.value()) {
JSONObject jsonObject = JSONObject.parseObject(result.body());
if (ObjectUtil.isNotEmpty(jsonObject) && "200".equals(jsonObject.getString("status"))) {
this.writing(this.mode);
if (resp.getCode() == 200) {
this.writing(200);
this.setRequireSucess(true);
}
}
} else {
this.writing(400);
message = RequestMethodEnum.getName("apply_labelling") + "apply_labelling 接口请求失败" + resp.getMessage();;
}
return true;
} else {
message = RequestMethodEnum.getName("apply_labelling") + "apply_labelling 设备无货未请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
return false;
}
}
public boolean exe_error() {
if (this.error == 0) {
@ -1428,7 +1408,7 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
this.writing("to_pressLayerX3_offset", StrUtil.isBlank(pressLayerX3_offset) ? "0" : pressLayerX3_offset);
this.writing("to_pressLayerY3_offset", StrUtil.isBlank(pressLayerY3_offset) ? "0" : pressLayerY3_offset);
this.writing("to_tool_coordinate", StrUtil.isBlank(tool_coordinate) ? "0" : tool_coordinate);
this.writing(this.mode);
this.writing(200);
}
this.setRequireSucess(true);
}
@ -1527,7 +1507,7 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
if (result.getStatus() == HttpStatus.OK.value()) {
JSONObject jsonObject = JSONObject.parseObject(result.body());
if (ObjectUtil.isNotEmpty(jsonObject) && "200".equals(jsonObject.getString("status"))) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
}
}
@ -1556,7 +1536,7 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
if (result.getStatus() == HttpStatus.OK.value()) {
JSONObject jsonObject = JSONObject.parseObject(result.body());
if (ObjectUtil.isNotEmpty(jsonObject) && "200".equals(jsonObject.getString("status"))) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
}
}
@ -1585,7 +1565,7 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
if (result.getStatus() == HttpStatus.OK.value()) {
JSONObject jsonObject = JSONObject.parseObject(result.body());
if (ObjectUtil.isNotEmpty(jsonObject) && "200".equals(jsonObject.getString("status"))) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
}
}

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

@ -17,6 +17,7 @@ import org.nl.acs.device_driver.RouteableDeviceDriver;
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.ext.wms.data.AcsToWmsData.applyTask.ApplyTaskRequest;
import org.nl.acs.ext.wms.data.AcsToWmsData.applyTask.ApplyTaskResponse;
import org.nl.acs.ext.wms.data.Resp;
import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.instruction.service.InstructionService;
@ -297,9 +298,10 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De
request.setOrder_code(this.getOrder_No());
message = RequestMethodEnum.getName("order_verify") + "order_verify 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -319,9 +321,10 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De
request.setOrder_code(this.getOrder_No());
message = RequestMethodEnum.getName("order_finish") + "order_finish 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -356,7 +359,7 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De
// dto.setOrder_status("2");
// }
// produceshiftorderService.update(dto);
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
}
}

10
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_split_manipulator/LnshSplitManipulatorDeviceDriver.java

@ -729,7 +729,7 @@ public class LnshSplitManipulatorDeviceDriver extends AbstractOpcDeviceDriver im
} else {
this.instruction_require_time = date;
JSONObject json = new JSONObject();
String linkobj = (String) this.getDevice().getExtraValue().get("link_device_code");
String linkobj = (String) this.getDevice().getExtraValue().get("resp.getMessage()vice_code");
String demosub = linkobj.substring(1, linkobj.length() - 1);
String demoArray[] = demosub.split(",");
List<String> demoList = Arrays.asList(demoArray);
@ -859,7 +859,7 @@ public class LnshSplitManipulatorDeviceDriver extends AbstractOpcDeviceDriver im
this.writing("to_one_qty", one_qty);
this.writing("to_two_qty", two_qty);
this.writing("to_tool_coordinate", tool_coordinate);
this.writing(this.mode);
this.writing(200);
requireSucess = true;
}
return true;
@ -890,7 +890,7 @@ public class LnshSplitManipulatorDeviceDriver extends AbstractOpcDeviceDriver im
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
if (ObjectUtil.isNotEmpty(result)) {
if (result.getStatus() == 200) {
this.writing(this.mode);
this.writing(200);
requireSucess = true;
}
}
@ -921,7 +921,7 @@ public class LnshSplitManipulatorDeviceDriver extends AbstractOpcDeviceDriver im
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
if (ObjectUtil.isNotEmpty(result)) {
if (result.getStatus() == 200) {
this.writing(this.mode);
this.writing(200);
requireSucess = true;
}
}
@ -953,7 +953,7 @@ public class LnshSplitManipulatorDeviceDriver extends AbstractOpcDeviceDriver im
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
if (ObjectUtil.isNotEmpty(result)) {
if (result.getStatus() == 200) {
this.writing(this.mode);
this.writing(200);
}
}

110
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/lnsh/lnsh_station/LnshStationDeviceDriver.java

@ -16,6 +16,8 @@ import org.nl.acs.device_driver.RouteableDeviceDriver;
import org.nl.acs.device_driver.StandardRequestMethod;
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.device_driver.lnsh.lnsh_mixing_mill.LnshMixingMillDeviceDriver;
import org.nl.acs.ext.wms.data.AcsToWmsData.applyTask.ApplyTaskResponse;
import org.nl.acs.ext.wms.data.Resp;
import org.nl.acs.ext.wms.data.AcsToWmsData.applyTask.ApplyTaskRequest;
import org.nl.acs.ext.wms.service.AcsToWmsService;
@ -24,6 +26,7 @@ import org.nl.acs.instruction.service.dto.Instruction;
import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.acs.monitor.DeviceStageMonitor;
import org.nl.acs.opc.Device;
import org.nl.acs.opc.DeviceAppService;
import org.nl.acs.route.service.RouteLineService;
import org.nl.acs.task.service.TaskService;
import org.nl.modules.lucene.service.LuceneExecuteLogService;
@ -59,6 +62,8 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
DeviceAppService deviceAppService = SpringContextHolder.getBean("deviceAppServiceImpl");
AcsToWmsService acsToWmsService = SpringContextHolder.getBean("acsToWmsServiceImpl");
String device_code;
@ -305,6 +310,23 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
}
public void writing(String param, String value) {
String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
+ "." + param;
String opcservcerid = this.getDevice().getOpc_server_id();
Server server = ReadUtil.getServer(opcservcerid);
Map<String, Object> itemMap = new HashMap<String, Object>();
if (value instanceof String) {
itemMap.put(to_param, value);
} else {
itemMap.put(to_param, value);
}
ReadUtil.write(itemMap, server);
server.disconnect();
logServer.deviceExecuteLog(this.device_code, "", "", param + " 写入 " + value);
}
public void writing(int command) {
String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
+ "." + ItemProtocol.item_to_command;
@ -485,9 +507,9 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
request.setVehicle_code(String.valueOf(barcode));
message = RequestMethodEnum.getName("apply_put_full_vehicle") + "apply_put_full_vehicle 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -511,16 +533,16 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
if(move == 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("apply_put_empty_vehicle") + "apply_put_empty_vehicle 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -543,16 +565,16 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
if(move == 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("apply_take_empty_vehicle") + "apply_take_empty_vehicle 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -576,16 +598,27 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setMaterial_code(material);
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
if(ObjectUtil.isNotEmpty(this.getDevice().getExtraValue().get("link_device_code"))){
Device device = deviceAppService.findDeviceByCode(this.getDevice().getExtraValue().get("link_device_code").toString());
if(ObjectUtil.isNotEmpty(device)){
LnshMixingMillDeviceDriver lnshMixingMillDeviceDriver;
if(device.getDeviceDriver() instanceof LnshMixingMillDeviceDriver){
lnshMixingMillDeviceDriver = (LnshMixingMillDeviceDriver) device.getDeviceDriver();
request.setMix_mum(String.valueOf(lnshMixingMillDeviceDriver.getMix_num()));
}
}
}
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("apply_take_full_vehicle") + "apply_take_full_vehicle 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -608,16 +641,16 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("apply_force_take_full_vehicle") + "apply_force_take_full_vehicle 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -640,16 +673,16 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("apply_force_take_full_vehicle_in_storage") + "apply_force_take_full_vehicle_in_storage 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -672,16 +705,17 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("barcode_sucess_apply") + "barcode_sucess_apply 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.writing(resp.getIs_standing_finish(),"1");
this.setRequireSucess(true);
} else {
this.writing(400);
@ -704,16 +738,16 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("get_vehicle_info") + "get_vehicle_info 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -735,16 +769,16 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("force_no_package") + "force_no_package 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);
@ -766,16 +800,16 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
if(move > 0) {
ApplyTaskRequest request = new ApplyTaskRequest();
request.setDevice_code(this.getDevice_code());
request.setRequest_medthod_code(this.getClass().getName());
request.setRequest_medthod_name(RequestMethodEnum.getName(this.getClass().getName()));
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
request.setWeight(String.valueOf(weight));
request.setVehicle_code(String.valueOf(barcode));
Resp resp = acsToWmsService.applyTask(request);
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
message = RequestMethodEnum.getName("apply_labelling") + "apply_labelling 接口请求LMS...";
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
if (resp.getCode() == 200) {
this.writing(this.mode);
this.writing(200);
this.setRequireSucess(true);
} else {
this.writing(400);

5
acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/data/AcsToWmsData/applyTask/ApplyTaskRequest.java

@ -22,6 +22,11 @@ public class ApplyTaskRequest extends BaseRequest {
*/
private String weight;
/**
* 碾次
*/
private String mix_mum;
/**
* 工单号
*/

8
acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/data/AcsToWmsData/applyTask/ApplyTaskResponse.java

@ -1,7 +1,9 @@
package org.nl.acs.ext.wms.data.AcsToWmsData.applyTask;
import lombok.Data;
import org.nl.acs.ext.wms.data.BaseResponse;
@Data
public class ApplyTaskResponse extends BaseResponse {
/**
@ -14,4 +16,10 @@ public class ApplyTaskResponse extends BaseResponse {
*/
private String is_package;
/**
* 碾次
*/
private String mix_num;
}

2
acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/AcsToWmsService.java

@ -27,7 +27,7 @@ public interface AcsToWmsService {
/**
* ACS向WMS申请晟华任务
*/
public Resp<BaseResponse> applyTask(BaseRequest request);
public String applyTask(BaseRequest request);
/**
* ACS向WMS申请贴标

4
acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsServiceImpl.java

@ -277,14 +277,14 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
@Override
public Resp<BaseResponse> applyTask(BaseRequest requestParam) {
public String applyTask(BaseRequest requestParam) {
try {
MDC.put(log_file_type, log_type);
String api = addressService.findByCode("lnshApplyTaskToWms").getMethods_url();
log.info("lnshApplyTaskToWms-----输入参数{}", JSON.toJSONString(requestParam));
String result = LmsUtil.notifyAcs(api, requestParam);
log.info("lnshApplyTaskToWms-----输出参数{}", result);
return RespUtil.getResp(result, new BaseResponse());
return result;
} finally {
MDC.remove(log_file_type);
}

202
acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java

@ -21,12 +21,16 @@ import org.nl.acs.device.service.DeviceService;
import org.nl.acs.device.service.StorageCellService;
import org.nl.acs.device.service.dto.DeviceAssignedDto;
import org.nl.acs.device.service.impl.DeviceServiceImpl;
import org.nl.acs.device_driver.RequestMethodEnum;
import org.nl.acs.device_driver.basedriver.standard_inspect_site.StandardInspectSiteDeviceDriver;
import org.nl.acs.device_driver.basedriver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver;
import org.nl.acs.device_driver.lamp_three_color.LampThreecolorDeviceDriver;
import org.nl.acs.device_driver.lnsh.lnsh_fold_disc_site.LnshFoldDiscSiteDeviceDriver;
import org.nl.acs.device_driver.lnsh.lnsh_station.LnshStationDeviceDriver;
import org.nl.acs.device_driver.standard_emptypallet_site.StandardEmptyPalletSiteDeviceDriver;
import org.nl.acs.ext.wms.data.AcsToWmsData.applyTask.ApplyTaskResponse;
import org.nl.acs.ext.wms.data.AcsToWmsData.feedBackTaskStatus.FeedBackTaskStatusRequest;
import org.nl.acs.ext.wms.data.Resp;
import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.instruction.service.InstructionService;
import org.nl.acs.instruction.service.dto.Instruction;
@ -491,90 +495,22 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
//判断是否为WMS下发的任务,如果是反馈任务状态给WMS
String hasWms = acsConfigService.findByCode(AcsConfig.HASWMS).getValue();
if (!StrUtil.startWith(dto.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) {
TaskFeedbackDto feefbackdto = taskFeedbackService.findByCode(entity.getTask_code());
JSONObject feed_jo = new JSONObject();
feed_jo.put("ext_task_uuid", entity.getExt_task_uuid());
feed_jo.put("task_code", dto.getTask_code());
feed_jo.put("task_status", dto.getTask_status());
JSONArray ja = new JSONArray();
ja.add(feed_jo);
String message = null;
HttpResponse body = null;
FeedBackTaskStatusRequest request = new FeedBackTaskStatusRequest();
request.setTask_id(entity.getExt_task_uuid());
request.setTask_code(dto.getTask_code());
request.setTask_status(dto.getTask_status());
request.setRequest_medthod_code(RequestMethodEnum.feedback_task_status.getCode());
request.setRequest_medthod_name(RequestMethodEnum.feedback_task_status.getName());
boolean flag = false;
String resp = null;
try {
body = acstowmsService.feedbackTaskStatusToWms(ja);
resp = acstowmsService.applyTask(request);
} catch (Exception e) {
flag = true;
message = e.getMessage();
e.printStackTrace();
} finally {
}
if (flag) {
if (ObjectUtil.isEmpty(feefbackdto)) {
feefbackdto = new TaskFeedbackDto();
feefbackdto.setTask_id(entity.getTask_id());
feefbackdto.setTask_code(entity.getTask_code());
feefbackdto.setTask_status(entity.getTask_status());
feefbackdto.setVehicle_type(entity.getVehicle_type());
feefbackdto.setVehicle_code(entity.getVehicle_code());
feefbackdto.setStart_device_code(entity.getStart_device_code());
feefbackdto.setStart_point_code(entity.getStart_point_code());
feefbackdto.setNext_device_code(entity.getNext_device_code());
feefbackdto.setNext_point_code(entity.getNext_point_code());
feefbackdto.setError_code("400");
feefbackdto.setIs_finished("0");
feefbackdto.setRemark(message);
taskFeedbackService.create(feefbackdto);
} else {
feefbackdto.setTask_status(entity.getTask_status());
feefbackdto.setStart_device_code(entity.getStart_device_code());
feefbackdto.setStart_point_code(entity.getStart_point_code());
feefbackdto.setNext_device_code(entity.getNext_device_code());
feefbackdto.setNext_point_code(entity.getNext_point_code());
feefbackdto.setError_code("400");
feefbackdto.setRemark(message);
taskFeedbackService.update(feefbackdto);
}
} else {
int status = body.getStatus();
JSONObject jo = JSONObject.parseObject(body.body());
if (ObjectUtil.isEmpty(feefbackdto)) {
feefbackdto = new TaskFeedbackDto();
feefbackdto.setTask_id(entity.getTask_id());
feefbackdto.setTask_code(entity.getTask_code());
feefbackdto.setTask_status(entity.getTask_status());
feefbackdto.setVehicle_type(entity.getVehicle_type());
feefbackdto.setVehicle_code(entity.getVehicle_code());
feefbackdto.setError_code(String.valueOf(body.getStatus()));
feefbackdto.setStart_device_code(entity.getStart_device_code());
feefbackdto.setStart_point_code(entity.getNext_point_code());
feefbackdto.setNext_device_code(entity.getNext_device_code());
feefbackdto.setNext_point_code(entity.getNext_point_code());
if (status == 200) {
if (StrUtil.equals(entity.getTask_status(), "2")) {
feefbackdto.setIs_finished("1");
} else {
feefbackdto.setIs_finished("0");
}
} else {
feefbackdto.setIs_finished("0");
feefbackdto.setRemark(jo.getString("message"));
}
taskFeedbackService.create(feefbackdto);
} else {
feefbackdto.setTask_status(entity.getTask_status());
if (status == 200) {
} else {
if (StrUtil.equals(entity.getTask_status(), "2")) {
feefbackdto.setIs_finished("1");
} else {
feefbackdto.setIs_finished("0");
}
}
taskFeedbackService.update(feefbackdto);
}
}
}
}
@ -607,97 +543,22 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
//判断是否为WMS下发的任务,如果是反馈任务状态给WMS
String hasWms = acsConfigService.findByCode(AcsConfig.HASWMS).getValue();
if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) {
TaskFeedbackDto feefbackdto = taskFeedbackService.findByCode(entity.getTask_code());
JSONObject feed_jo = new JSONObject();
Instruction inst = instructionservice.findByTaskcodeToWms(entity.getTask_code());
feed_jo.put("ext_task_uuid", entity.getExt_task_uuid());
feed_jo.put("task_code", entity.getTask_code());
feed_jo.put("task_status", entity.getTask_status());
if (ObjectUtil.isNotEmpty(inst)) {
feed_jo.put("car_no", inst.getCarno());
}
JSONArray ja = new JSONArray();
ja.add(feed_jo);
String message = null;
HttpResponse body = null;
FeedBackTaskStatusRequest request = new FeedBackTaskStatusRequest();
request.setTask_id(entity.getExt_task_uuid());
request.setTask_code(entity.getTask_code());
request.setTask_status(entity.getTask_status());
request.setRequest_medthod_code(RequestMethodEnum.feedback_task_status.getCode());
request.setRequest_medthod_name(RequestMethodEnum.feedback_task_status.getName());
boolean flag = false;
String resp = null;
try {
body = acstowmsService.feedbackTaskStatusToWms(ja);
resp = acstowmsService.applyTask(request);
} catch (Exception e) {
flag = true;
message = e.getMessage();
e.printStackTrace();
} finally {
}
if (flag) {
if (ObjectUtil.isEmpty(feefbackdto)) {
feefbackdto = new TaskFeedbackDto();
feefbackdto.setTask_id(entity.getTask_id());
feefbackdto.setTask_code(entity.getTask_code());
feefbackdto.setTask_status(entity.getTask_status());
feefbackdto.setVehicle_type(entity.getVehicle_type());
feefbackdto.setVehicle_code(entity.getVehicle_code());
feefbackdto.setStart_device_code(entity.getStart_device_code());
feefbackdto.setStart_point_code(entity.getStart_point_code());
feefbackdto.setNext_device_code(entity.getNext_device_code());
feefbackdto.setNext_point_code(entity.getNext_point_code());
feefbackdto.setError_code("400");
feefbackdto.setIs_finished("0");
feefbackdto.setRemark(message);
taskFeedbackService.create(feefbackdto);
} else {
feefbackdto.setTask_status(entity.getTask_status());
feefbackdto.setStart_device_code(entity.getStart_device_code());
feefbackdto.setStart_point_code(entity.getStart_point_code());
feefbackdto.setNext_device_code(entity.getNext_device_code());
feefbackdto.setNext_point_code(entity.getNext_point_code());
feefbackdto.setError_code("400");
feefbackdto.setRemark(message);
taskFeedbackService.update(feefbackdto);
}
} else {
int status = body.getStatus();
JSONObject jo = JSONObject.parseObject(body.body());
if (ObjectUtil.isEmpty(feefbackdto)) {
feefbackdto = new TaskFeedbackDto();
feefbackdto.setTask_id(entity.getTask_id());
feefbackdto.setTask_code(entity.getTask_code());
feefbackdto.setTask_status(entity.getTask_status());
feefbackdto.setVehicle_type(entity.getVehicle_type());
feefbackdto.setVehicle_code(entity.getVehicle_code());
feefbackdto.setError_code(String.valueOf(body.getStatus()));
feefbackdto.setStart_device_code(entity.getStart_device_code());
feefbackdto.setStart_point_code(entity.getNext_point_code());
feefbackdto.setNext_device_code(entity.getNext_device_code());
feefbackdto.setNext_point_code(entity.getNext_point_code());
if (status == 200) {
if (StrUtil.equals(entity.getTask_status(), "2")) {
feefbackdto.setIs_finished("1");
} else {
feefbackdto.setIs_finished("0");
}
} else {
feefbackdto.setIs_finished("0");
feefbackdto.setRemark(jo.getString("message"));
}
taskFeedbackService.create(feefbackdto);
} else {
feefbackdto.setTask_status(entity.getTask_status());
if (status == 200) {
if (StrUtil.equals(entity.getTask_status(), "2")) {
feefbackdto.setIs_finished("1");
} else {
feefbackdto.setIs_finished("0");
}
} else {
feefbackdto.setIs_finished("0");
feefbackdto.setRemark(jo.getString("message"));
}
taskFeedbackService.update(feefbackdto);
}
}
}
//如果属于先知AGV,关闭运单序列
if (StrUtil.equals(acsConfigService.findByCode(AcsConfig.AGVTYPE).getValue(), "3")) {
@ -736,13 +597,22 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
//判断是否为WMS下发的任务,如果是反馈任务状态给WMS
String hasWms = acsConfigService.findByCode(AcsConfig.HASWMS).getValue();
if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) {
JSONObject feed_jo = new JSONObject();
feed_jo.put("ext_task_uuid", entity.getExt_task_uuid());
feed_jo.put("task_code", entity.getTask_code());
feed_jo.put("task_status", entity.getTask_status());
JSONArray ja = new JSONArray();
ja.add(feed_jo);
acstowmsService.feedbackTaskStatusToWms(ja);
FeedBackTaskStatusRequest request = new FeedBackTaskStatusRequest();
request.setTask_id(entity.getExt_task_uuid());
request.setTask_code(entity.getTask_code());
request.setTask_status(entity.getTask_status());
request.setRequest_medthod_code(RequestMethodEnum.feedback_task_status.getCode());
request.setRequest_medthod_name(RequestMethodEnum.feedback_task_status.getName());
boolean flag = false;
String resp = null;
try {
resp = acstowmsService.applyTask(request);
} catch (Exception e) {
flag = true;
e.printStackTrace();
} finally {
}
}
List<RouteLineDto> shortPathsList = routeLineService.getShortPathLines(entity.getStart_device_code(), entity.getNext_device_code(), entity.getRoute_plan_code());
String type = shortPathsList.get(0).getType();

2
acs/nladmin-ui/src/views/acs/device/driver/agv/agv_ndc_one.vue

@ -83,7 +83,7 @@ export default {
//
const parentForm = this.parentForm
parentForm.is_route = true
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

2
acs/nladmin-ui/src/views/acs/device/driver/agv/agv_ndc_two.vue

@ -95,7 +95,7 @@ export default {
this.configLoading = true
//
const parentForm = this.parentForm
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

2
acs/nladmin-ui/src/views/acs/device/driver/cargo_lift_conveyor.vue

@ -464,7 +464,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

2
acs/nladmin-ui/src/views/acs/device/driver/empty_vehicle_stacking_position.vue

@ -464,7 +464,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

2
acs/nladmin-ui/src/views/acs/device/driver/hailiang_smart_plc_test.vue

@ -455,7 +455,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

2
acs/nladmin-ui/src/views/acs/device/driver/haokai_auto_conveyor.vue

@ -435,7 +435,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

2
acs/nladmin-ui/src/views/acs/device/driver/lamp_three_color.vue

@ -318,7 +318,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

2
acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_Laminating_machine.vue

@ -473,7 +473,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

2
acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_crusher.vue

@ -464,7 +464,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

2
acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_fold_disc_site.vue

@ -493,7 +493,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

2
acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_kiln_lane.vue

@ -464,7 +464,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false

2
acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_kiln_truss.vue

@ -464,7 +464,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

2
acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_labeling_machine.vue

@ -540,7 +540,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

2
acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_out_kiln_truss.vue

@ -464,7 +464,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

2
acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_package_line.vue

@ -464,7 +464,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

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

@ -464,7 +464,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

2
acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_package_site.vue

@ -450,7 +450,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

2
acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_pallet_storage.vue

@ -464,7 +464,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

2
acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_palletizing_manipulator.vue

@ -500,7 +500,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

2
acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_palletizing_manipulator_site.vue

@ -940,7 +940,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

2
acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_rgv.vue

@ -567,7 +567,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

2
acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_split_manipulator.vue

@ -464,7 +464,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

19
acs/nladmin-ui/src/views/acs/device/driver/lnsh/lnsh_station.vue

@ -66,6 +66,23 @@
</div>
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="small" label-width="78px">
<el-row>
<el-col :span="8">
<el-form-item label="关联设备" prop="device_code">
<el-select
v-model="form.link_device_code"
clearable
filterable
placeholder="请选择"
>
<el-option
v-for="item in deviceList"
:key="item.device_code"
:label="item.device_name"
:value="item.device_code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="检验有货">
<el-switch v-model="form.inspect_in_stocck" />
@ -365,7 +382,7 @@ export default {
},
{
mode: '11',
request: 'barcode_sucess_apply'
request: 'barcode_success_apply'
},
{
mode: '12',

2
acs/nladmin-ui/src/views/acs/device/driver/paint_conveyor.vue

@ -471,7 +471,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

2
acs/nladmin-ui/src/views/acs/device/driver/standard_conveyor_control.vue

@ -478,7 +478,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

2
acs/nladmin-ui/src/views/acs/device/driver/standard_conveyor_control_with_scanner.vue

@ -522,7 +522,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

2
acs/nladmin-ui/src/views/acs/device/driver/standard_conveyor_monitor.vue

@ -453,7 +453,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

2
acs/nladmin-ui/src/views/acs/device/driver/standard_inspect_site.vue

@ -466,7 +466,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

2
acs/nladmin-ui/src/views/acs/device/driver/standard_scanner.vue

@ -98,7 +98,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

2
acs/nladmin-ui/src/views/acs/device/driver/standard_storage.vue

@ -268,7 +268,7 @@ export default {
parentForm.is_route = true
parentForm.plc_id = this.plc_id
parentForm.opc_id = this.opc_id
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
this.notify('保存成功', 'success')
this.configLoading = false
}).catch(err => {

Loading…
Cancel
Save