嘉耐更新
This commit is contained in:
@@ -103,7 +103,7 @@ public enum DriverTypeEnum {
|
||||
|
||||
LNSH_SPLIT_MANIPULATOR(47, "lnsh_split_manipulator", "晟华-拆垛机械手", "station"),
|
||||
|
||||
LNSH_RGV(48, "lnsh_rgv", "晟华-RGV", "station"),
|
||||
LNSH_RGV(48, "lnsh_rgv", "晟华-RGV", "rgv"),
|
||||
|
||||
LNSH_PACKAGE_LINE(49, "lnsh_package_line", "晟华-包装机", "station"),
|
||||
|
||||
|
||||
@@ -1190,7 +1190,19 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
|
||||
extraObj.put(json.getString("extra_code"), json.get("extra_value"));
|
||||
}
|
||||
}
|
||||
|
||||
extraObj.put("address", dto.getAddress());
|
||||
JSONArray get_device_code = extraObj.getJSONArray("get_device_code");
|
||||
JSONArray load_device_code = extraObj.getJSONArray("load_device_code");
|
||||
JSONArray put_device_code = extraObj.getJSONArray("put_device_code");
|
||||
if (ObjectUtil.isNotEmpty(get_device_code)) {
|
||||
extraObj.put("get_device_code",get_device_code);
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(load_device_code)) {
|
||||
extraObj.put("load_device_code",load_device_code);
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(put_device_code)) {
|
||||
extraObj.put("put_device_code",put_device_code);
|
||||
}
|
||||
extraObj.put("address", dto.getAddress());
|
||||
result.put("form", extraObj);
|
||||
|
||||
|
||||
@@ -2,8 +2,10 @@ package org.nl.acs.device_driver.lnsh.lnsh_mixing_mill;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
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.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -275,17 +277,20 @@ public class LnshMixingMillDeviceDriver extends AbstractOpcDeviceDriver implemen
|
||||
} else {
|
||||
this.instruction_require_time = date;
|
||||
HttpResponse result = acsToWmsService.enterOrder(json);
|
||||
if (result.getStatus() == 200) {
|
||||
this.writing(this.mode);
|
||||
ProduceshiftorderDto dto = produceshiftorderService.findByCode(String.valueOf(order_No));
|
||||
if (this.mode == 4) {
|
||||
dto.setOrder_status("2");
|
||||
} else if (this.mode == 3){
|
||||
dto.setOrder_status("0");
|
||||
if (ObjectUtil.isNotEmpty(result)) {
|
||||
JSONObject jsonObject = JSON.parseObject(result.body());
|
||||
if (result.getStatus() == 200 && jsonObject.get("status").equals("200")) {
|
||||
this.writing(this.mode);
|
||||
ProduceshiftorderDto dto = produceshiftorderService.findByCode(String.valueOf(order_No));
|
||||
if (this.mode == 4) {
|
||||
dto.setOrder_status("2");
|
||||
} else if (this.mode == 3) {
|
||||
dto.setOrder_status("0");
|
||||
}
|
||||
produceshiftorderService.update(dto);
|
||||
}
|
||||
produceshiftorderService.update(dto);
|
||||
}
|
||||
requireSucess = true;
|
||||
this.setRequireSucess(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.nl.acs.device_driver.lnsh.lnsh_package_pallet_manipulator;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
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.JSONObject;
|
||||
@@ -775,13 +776,17 @@ public class LnshPackagePalletManipulatorDeviceDriver extends AbstractOpcDeviceD
|
||||
} else {
|
||||
this.instruction_require_time = date;
|
||||
HttpResponse result = acsToWmsService.enterOrder(json);
|
||||
if (result.getStatus() == 200) {
|
||||
this.writing(this.mode);
|
||||
ProduceshiftorderDto dto = produceshiftorderService.findByCode(String.valueOf(order_No));
|
||||
dto.setOrder_status("0");
|
||||
produceshiftorderService.update(dto);
|
||||
if (ObjectUtil.isNotEmpty(result)) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||
if (result.getStatus() == 200 && jsonObject.get("status").equals("200")) {
|
||||
this.writing(this.mode);
|
||||
ProduceshiftorderDto dto = produceshiftorderService.findByCode(String.valueOf(order_No));
|
||||
dto.setOrder_status("0");
|
||||
produceshiftorderService.update(dto);
|
||||
}
|
||||
}
|
||||
requireSucess = true;
|
||||
|
||||
this.setRequireSucess(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1011,10 +1016,13 @@ public class LnshPackagePalletManipulatorDeviceDriver extends AbstractOpcDeviceD
|
||||
json.put("tool_coordinate",tool_coordinate);
|
||||
|
||||
HttpResponse result = acsToWmsService.applyTaskManipulatorToWms(json);
|
||||
if (result.getStatus() == 200) {
|
||||
this.writing(this.mode);
|
||||
if (ObjectUtil.isNotEmpty(result)) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||
if (result.getStatus() == 200 && jsonObject.get("status").equals("200")) {
|
||||
this.writing(this.mode);
|
||||
}
|
||||
}
|
||||
requireSucess = true;
|
||||
this.setRequireSucess(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1096,10 +1104,13 @@ public class LnshPackagePalletManipulatorDeviceDriver extends AbstractOpcDeviceD
|
||||
json.put("tool_coordinate",tool_coordinate);
|
||||
|
||||
HttpResponse result = acsToWmsService.applyTaskManipulatorToWms(json);
|
||||
if (result.getStatus() == 200) {
|
||||
this.writing(this.mode);
|
||||
if (ObjectUtil.isNotEmpty(result)) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||
if (result.getStatus() == 200 && jsonObject.get("status").equals("200")) {
|
||||
this.writing(this.mode);
|
||||
}
|
||||
}
|
||||
requireSucess = true;
|
||||
this.setRequireSucess(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1122,11 +1133,13 @@ public class LnshPackagePalletManipulatorDeviceDriver extends AbstractOpcDeviceD
|
||||
json.put("qty",qty);
|
||||
json.put("vehicle_code",barcode);
|
||||
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
|
||||
if (result.getStatus() == 200) {
|
||||
this.writing(this.mode);
|
||||
if (ObjectUtil.isNotEmpty(result)) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||
if (result.getStatus() == 200 && jsonObject.get("status").equals("200")) {
|
||||
this.writing(this.mode);
|
||||
}
|
||||
}
|
||||
|
||||
requireSucess = true;
|
||||
this.setRequireSucess(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.nl.acs.device_driver.lnsh.lnsh_palletizing_manipulator;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
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.JSONObject;
|
||||
@@ -292,10 +293,13 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri
|
||||
json.put("qty",encoder_qty);
|
||||
json.put("is_full","1");
|
||||
HttpResponse result = acsToWmsService.applyTaskManipulatorToWms(json);
|
||||
if (result.getStatus() == 200) {
|
||||
this.writing(this.mode);
|
||||
if (ObjectUtil.isNotEmpty(result)) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||
if (result.getStatus() == 200 && jsonObject.get("status").equals("200")) {
|
||||
this.writing(this.mode);
|
||||
}
|
||||
}
|
||||
requireSucess = true;
|
||||
this.setRequireSucess(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -343,11 +347,13 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri
|
||||
json.put("type","4");
|
||||
json.put("qty",encoder_qty);
|
||||
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
|
||||
if (result.getStatus() == 200) {
|
||||
this.writing(this.mode);
|
||||
if (ObjectUtil.isNotEmpty(result)) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||
if (result.getStatus() == 200 && jsonObject.get("status").equals("200")) {
|
||||
this.writing(this.mode);
|
||||
}
|
||||
}
|
||||
|
||||
requireSucess = true;
|
||||
this.setRequireSucess(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.nl.acs.device_driver.lnsh.lnsh_split_manipulator;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
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.JSONObject;
|
||||
@@ -336,10 +337,13 @@ public class LnshSplitManipulatorDeviceDriver extends AbstractOpcDeviceDriver im
|
||||
json.put("is_full","1");
|
||||
|
||||
HttpResponse result = acsToWmsService.applyTaskManipulatorToWms(json);
|
||||
if (result.getStatus() == 200) {
|
||||
this.writing(this.mode);
|
||||
if (ObjectUtil.isNotEmpty(result)) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||
if (result.getStatus() == 200 && jsonObject.get("status").equals("200")) {
|
||||
this.writing(this.mode);
|
||||
}
|
||||
}
|
||||
requireSucess = true;
|
||||
this.setRequireSucess(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ public class ItemProtocol {
|
||||
public static String item_barcode = "barcode";
|
||||
public static String item_specifications = "specifications";
|
||||
public static String item_batch = "batch";
|
||||
public static String item_container_type = "container_type";
|
||||
|
||||
public static String item_to_command = "to_command";
|
||||
public static String item_to_target = "to_target";
|
||||
@@ -89,6 +90,10 @@ public class ItemProtocol {
|
||||
return this.getOpcIntegerValue(item_batch);
|
||||
}
|
||||
|
||||
public int getContainer_type() {
|
||||
return this.getOpcIntegerValue(item_container_type);
|
||||
}
|
||||
|
||||
public int getToCommand() {
|
||||
return this.getOpcIntegerValue(item_to_command);
|
||||
}
|
||||
@@ -143,9 +148,10 @@ public class ItemProtocol {
|
||||
list.add(new ItemDto(item_task, "任务号", "DB4.D6"));
|
||||
list.add(new ItemDto(item_weight, "重量", "DB4.D10"));
|
||||
list.add(new ItemDto(item_batch, "批次", "DB4.D14"));
|
||||
list.add(new ItemDto(item_material, "物料", "DB4.S18"));
|
||||
list.add(new ItemDto(item_barcode, "条码", "DB4.S274"));
|
||||
list.add(new ItemDto(item_specifications, "规格", "DB4.S530"));
|
||||
list.add(new ItemDto(item_specifications, "规格", "DB4.S18"));
|
||||
list.add(new ItemDto(item_material, "物料", "DB4.S274"));
|
||||
list.add(new ItemDto(item_barcode, "条码", "DB4.S530"));
|
||||
list.add(new ItemDto(item_container_type, "托盘类型", "DB4.B786"));
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@@ -66,9 +66,10 @@ public class LnshStationDefination implements OpcDeviceDriverDefination {
|
||||
list.add(new ItemDto(ItemProtocol.item_task, "任务号", "DB4.D6"));
|
||||
list.add(new ItemDto(ItemProtocol.item_weight, "重量", "DB4.D10"));
|
||||
list.add(new ItemDto(ItemProtocol.item_batch, "批次", "DB4.D14"));
|
||||
list.add(new ItemDto(ItemProtocol.item_material, "物料", "DB4.S18"));
|
||||
list.add(new ItemDto(ItemProtocol.item_barcode, "条码", "DB4.S274"));
|
||||
list.add(new ItemDto(ItemProtocol.item_specifications, "规格", "DB4.S530"));
|
||||
list.add(new ItemDto(ItemProtocol.item_specifications, "规格", "DB4.S18"));
|
||||
list.add(new ItemDto(ItemProtocol.item_material, "物料", "DB4.S274"));
|
||||
list.add(new ItemDto(ItemProtocol.item_barcode, "条码", "DB4.S530"));
|
||||
list.add(new ItemDto(ItemProtocol.item_container_type, "托盘类型", "DB4.S786"));
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.nl.acs.device_driver.lnsh.lnsh_station;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
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.JSONArray;
|
||||
@@ -276,11 +277,13 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
json.put("vehicle_code",barcode);
|
||||
json.put("is_full","0");
|
||||
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
|
||||
if (result.getStatus() == 200) {
|
||||
this.writing(this.mode);
|
||||
if (ObjectUtil.isNotEmpty(result)) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||
if (result.getStatus() == 200 && jsonObject.get("status").equals("200")) {
|
||||
this.writing(this.mode);
|
||||
}
|
||||
}
|
||||
|
||||
requireSucess = true;
|
||||
this.setRequireSucess(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -304,11 +307,13 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
json.put("vehicle_code",barcode);
|
||||
json.put("is_full","0");
|
||||
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
|
||||
if (result.getStatus() == 200) {
|
||||
this.writing(this.mode);
|
||||
if (ObjectUtil.isNotEmpty(result)) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||
if (result.getStatus() == 200 && jsonObject.get("status").equals("200")) {
|
||||
this.writing(this.mode);
|
||||
}
|
||||
}
|
||||
|
||||
requireSucess = true;
|
||||
this.setRequireSucess(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -328,15 +333,17 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("device_code",this.device_code);
|
||||
json.put("type","1");
|
||||
json.put("qty",weight);
|
||||
json.put("material",material);
|
||||
json.put("vehicle_code",barcode);
|
||||
json.put("is_full","1");
|
||||
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
|
||||
if (result.getStatus() == 200) {
|
||||
this.writing(this.mode);
|
||||
if (ObjectUtil.isNotEmpty(result)) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||
if (result.getStatus() == 200 && jsonObject.get("status").equals("200")) {
|
||||
this.writing(this.mode);
|
||||
}
|
||||
}
|
||||
|
||||
requireSucess = true;
|
||||
this.setRequireSucess(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.nl.acs.device_driver.lnsh.rljn_package_palletSplit_manipulator;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
@@ -813,13 +814,17 @@ public class RljnPackagePalletSplitManipulatorDeviceDriver extends AbstractOpcDe
|
||||
} else {
|
||||
this.instruction_require_time = date;
|
||||
HttpResponse result = acsToWmsService.enterOrder(json);
|
||||
if (result.getStatus() == 200) {
|
||||
this.writing(this.mode);
|
||||
ProduceshiftorderDto dto = produceshiftorderService.findByCode(String.valueOf(order_No));
|
||||
dto.setOrder_status("0");
|
||||
produceshiftorderService.update(dto);
|
||||
if (ObjectUtil.isNotEmpty(result)) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||
if (result.getStatus() == 200 && jsonObject.get("status").equals("200")) {
|
||||
this.writing(this.mode);
|
||||
ProduceshiftorderDto dto = produceshiftorderService.findByCode(String.valueOf(order_No));
|
||||
dto.setOrder_status("0");
|
||||
produceshiftorderService.update(dto);
|
||||
}
|
||||
}
|
||||
requireSucess = true;
|
||||
|
||||
this.setRequireSucess(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -967,7 +972,7 @@ public class RljnPackagePalletSplitManipulatorDeviceDriver extends AbstractOpcDe
|
||||
this.writing("to_tool_coordinate",tool_coordinate);
|
||||
|
||||
}
|
||||
requireSucess = true;
|
||||
this.setRequireSucess(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1049,10 +1054,13 @@ public class RljnPackagePalletSplitManipulatorDeviceDriver extends AbstractOpcDe
|
||||
json.put("tool_coordinate",tool_coordinate);
|
||||
|
||||
HttpResponse result = acsToWmsService.applyTaskManipulatorToWms(json);
|
||||
if (result.getStatus() == 200) {
|
||||
this.writing(this.mode);
|
||||
if (ObjectUtil.isNotEmpty(result)) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||
if (result.getStatus() == 200 && jsonObject.get("status").equals("200")) {
|
||||
this.writing(this.mode);
|
||||
}
|
||||
}
|
||||
requireSucess = true;
|
||||
this.setRequireSucess(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1134,10 +1142,13 @@ public class RljnPackagePalletSplitManipulatorDeviceDriver extends AbstractOpcDe
|
||||
json.put("tool_coordinate",tool_coordinate);
|
||||
|
||||
HttpResponse result = acsToWmsService.applyTaskManipulatorToWms(json);
|
||||
if (result.getStatus() == 200) {
|
||||
this.writing(this.mode);
|
||||
if (ObjectUtil.isNotEmpty(result)) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||
if (result.getStatus() == 200 && jsonObject.get("status").equals("200")) {
|
||||
this.writing(this.mode);
|
||||
}
|
||||
}
|
||||
requireSucess = true;
|
||||
this.setRequireSucess(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1160,11 +1171,13 @@ public class RljnPackagePalletSplitManipulatorDeviceDriver extends AbstractOpcDe
|
||||
json.put("qty",qty);
|
||||
json.put("vehicle_code",barcode);
|
||||
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
|
||||
if (result.getStatus() == 200) {
|
||||
this.writing(this.mode);
|
||||
if (ObjectUtil.isNotEmpty(result)) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||
if (result.getStatus() == 200 && jsonObject.get("status").equals("200")) {
|
||||
this.writing(this.mode);
|
||||
}
|
||||
}
|
||||
|
||||
requireSucess = true;
|
||||
this.setRequireSucess(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user