rev 压机驱动 add码垛关联拆垛
This commit is contained in:
@@ -365,8 +365,10 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 单次放置完成
|
||||
* @return
|
||||
*/
|
||||
public boolean apply_one_grab() {
|
||||
GrabRequest request = new GrabRequest();
|
||||
request.setDevice_code(this.getDevice_code());
|
||||
|
||||
@@ -24,12 +24,12 @@ public class LnshPalletizingManipulatorSiteDefination implements OpcDeviceDriver
|
||||
|
||||
@Override
|
||||
public String getDriverName() {
|
||||
return "晟华-码垛机械手工位";
|
||||
return "晟华-包装拆码垛机械手工位";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDriverDescription() {
|
||||
return "晟华-码垛机械手工位";
|
||||
return "晟华-包装拆码垛机械手工位";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -20,6 +20,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.device_driver.lnsh.lnsh_mixing_mill.LnshMixingMillDeviceDriver;
|
||||
import org.nl.acs.ext.wms.data.AcsToWmsData.applyTask.ApplyDeviceDto;
|
||||
import org.nl.acs.ext.wms.data.AcsToWmsData.applyTask.ApplyTaskResponse;
|
||||
import org.nl.acs.ext.wms.data.AcsToWmsData.getVehicle.GetPalletizeRequest;
|
||||
import org.nl.acs.ext.wms.data.AcsToWmsData.getVehicle.GetPalletizeResponse;
|
||||
@@ -43,10 +44,7 @@ import org.openscada.opc.lib.da.Server;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 晟华-码垛机械手工位
|
||||
@@ -832,12 +830,14 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
|
||||
public synchronized boolean apply_take_full_vehicle() {
|
||||
if(move > 0) {
|
||||
ApplyTaskRequest request = new ApplyTaskRequest();
|
||||
ApplyDeviceDto applyDeviceDto=new ApplyDeviceDto();
|
||||
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.setMaterial_code(material);
|
||||
request.setWeight(String.valueOf(weight));
|
||||
request.setVehicle_code(String.valueOf(barcode));
|
||||
List<ApplyDeviceDto> listDto = new ArrayList<>();
|
||||
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)){
|
||||
@@ -847,7 +847,18 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
|
||||
request.setMix_mum(String.valueOf(lnshMixingMillDeviceDriver.getMix_num()));
|
||||
}
|
||||
}
|
||||
}
|
||||
List<String> getDeviceCodeList = this.getExtraDeviceCodes("link_device_code");
|
||||
LnshPalletizingManipulatorSiteDeviceDriver lnshPalletizingManipulatorSiteDeviceDriver;
|
||||
for (int i = 0; i < getDeviceCodeList.size(); i++) {
|
||||
if(device.getDeviceDriver() instanceof LnshPalletizingManipulatorSiteDeviceDriver){
|
||||
lnshPalletizingManipulatorSiteDeviceDriver=(LnshPalletizingManipulatorSiteDeviceDriver) getDevice().getDeviceDriver();
|
||||
applyDeviceDto.setQty(String.valueOf(lnshPalletizingManipulatorSiteDeviceDriver.getEncoder_qty()));
|
||||
applyDeviceDto.setDevice_code(String.valueOf(lnshPalletizingManipulatorSiteDeviceDriver.getBarcode()));
|
||||
}
|
||||
}
|
||||
listDto.add(applyDeviceDto);
|
||||
request.setList(listDto);
|
||||
}
|
||||
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)));
|
||||
|
||||
@@ -32,12 +32,22 @@ public class ItemProtocol {
|
||||
public static String item_to_order_No = "to_order_No";
|
||||
public static String item_to_qty = "to_qty";
|
||||
public static String item_to_material_code = "to_material_code";
|
||||
public static String item_to_formula = "to_formula";
|
||||
public static String item_to_brick_code = "to_brick_code";
|
||||
public static String item_to_product_code = "to_product_code";
|
||||
public static String item_to_AlongSide = "to_AlongSide";
|
||||
public static String item_to_BshortSide = "to_BshortSide";
|
||||
public static String item_to_Htrapezoidal = "to_Htrapezoidal";
|
||||
public static String item_to_Wthickness = "to_Wthickness";
|
||||
|
||||
public static String item_to_size_error = "to_size_error";
|
||||
public static String item_to_single_weight = "to_single_weight";
|
||||
public static String item_to_drawing_address = "to_drawing_address";
|
||||
public static String item_to_standard_weight = "to_standard_weight";
|
||||
public static String item_to_detection_error = "to_detection_error";
|
||||
public static String item_to_standard_size_height1 = "to_standard_size_height1";
|
||||
public static String item_to_standard_size_height2 = "to_standard_size_height2";
|
||||
public static String item_to_standard_size_height3 = "to_standard_size_height3";
|
||||
public static String item_to_standard_size_height4 = "to_standard_size_height4";
|
||||
|
||||
private LnshPressDeviceDriver driver;
|
||||
|
||||
@@ -121,6 +131,14 @@ public class ItemProtocol {
|
||||
return this.getOpcStringValue(item_to_material_code);
|
||||
}
|
||||
|
||||
public String getTo_brick_code() {
|
||||
return this.getOpcStringValue(item_to_brick_code);
|
||||
}
|
||||
|
||||
public String getTo_Formula() {
|
||||
return this.getOpcStringValue(item_to_formula);
|
||||
}
|
||||
|
||||
public int getTo_Product_code() {
|
||||
return this.getOpcIntegerValue(item_to_product_code);
|
||||
}
|
||||
@@ -141,6 +159,23 @@ public class ItemProtocol {
|
||||
return this.getOpcIntegerValue(item_to_Wthickness);
|
||||
}
|
||||
|
||||
public int getToSizeError() {return this.getOpcIntegerValue(item_to_size_error);}
|
||||
|
||||
public int getToSingleWeight() {return this.getOpcIntegerValue(item_to_single_weight);}
|
||||
|
||||
public int getToDrawingAddress() {return this.getOpcIntegerValue(item_to_drawing_address);}
|
||||
|
||||
public int getToStandardWeight() {return this.getOpcIntegerValue(item_to_standard_weight);}
|
||||
|
||||
public int getToDetectionError() {return this.getOpcIntegerValue(item_to_detection_error);}
|
||||
|
||||
public int getToStandardSizeHeight1() {return this.getOpcIntegerValue(item_to_standard_size_height1);}
|
||||
|
||||
public int getToStandardSizeHeight2() {return this.getOpcIntegerValue(item_to_standard_size_height2);}
|
||||
|
||||
public int getToStandardSizeHeight3() {return this.getOpcIntegerValue(item_to_standard_size_height3);}
|
||||
|
||||
public int getToStandardSizeHeight4() {return this.getOpcIntegerValue(item_to_standard_size_height4);}
|
||||
//是否有货
|
||||
public int hasGoods(int move) {
|
||||
return move;
|
||||
@@ -196,11 +231,22 @@ public class ItemProtocol {
|
||||
list.add(new ItemDto(item_to_order_No, "工单号", "DB101.STRING4.50"));
|
||||
list.add(new ItemDto(item_to_qty, "生产重量", "DB101.D56"));
|
||||
list.add(new ItemDto(item_to_material_code, "下发物料编号", "DB101.STRING60.50"));
|
||||
list.add(new ItemDto(item_to_product_code, "产品编号", "DB101.W112"));
|
||||
list.add(new ItemDto(item_to_AlongSide, "A长边", "DB101.W114"));
|
||||
list.add(new ItemDto(item_to_BshortSide, "B短边", "DB101.W116"));
|
||||
list.add(new ItemDto(item_to_Htrapezoidal, "H梯形高", "DB101.W118"));
|
||||
list.add(new ItemDto(item_to_Wthickness, "W厚度", "DB101.W120"));
|
||||
list.add(new ItemDto(item_to_brick_code, "砖型代号", "DB101.STRING112.50"));
|
||||
list.add(new ItemDto(item_to_formula, "配方代号", "DB101.STRING164.50"));
|
||||
list.add(new ItemDto(item_to_product_code, "产品编号", "DB101.W216"));
|
||||
list.add(new ItemDto(item_to_AlongSide, "A长边", "DB101.W218"));
|
||||
list.add(new ItemDto(item_to_BshortSide, "B短边", "DB101.W220"));
|
||||
list.add(new ItemDto(item_to_Htrapezoidal, "H梯形高", "DB101.W222"));
|
||||
list.add(new ItemDto(item_to_Wthickness, "W厚度", "DB101.W224"));
|
||||
list.add(new ItemDto(item_to_size_error, "尺寸允许误差", "DB101.W228"));
|
||||
list.add(new ItemDto(item_to_single_weight, "单重允许误差", "DB101.W232"));
|
||||
list.add(new ItemDto(item_to_drawing_address, "图纸地址", "DB101.W236"));
|
||||
list.add(new ItemDto(item_to_standard_weight, "标准重量", "DB101.W240"));
|
||||
list.add(new ItemDto(item_to_detection_error, "检测误差值", "DB101.W244"));
|
||||
list.add(new ItemDto(item_to_standard_size_height1, "标准尺寸高度1", "DB101.W248"));
|
||||
list.add(new ItemDto(item_to_standard_size_height2, "标准尺寸高度2", "DB101.W252"));
|
||||
list.add(new ItemDto(item_to_standard_size_height3, "标准尺寸高度3", "DB101.W256"));
|
||||
list.add(new ItemDto(item_to_standard_size_height4, "标准尺寸高度4", "DB101.W260"));
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package org.nl.acs.ext.wms.data.AcsToWmsData.applyTask;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ApplyDeviceDto {
|
||||
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
private String device_code;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private String qty;
|
||||
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
private String vehicle_code;
|
||||
|
||||
/**
|
||||
* 载具类型
|
||||
*/
|
||||
private String vehicle_type;
|
||||
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
package org.nl.acs.ext.wms.data.AcsToWmsData.applyTask;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nl.acs.device.service.dto.DeviceDto;
|
||||
import org.nl.acs.ext.wms.data.BaseRequest;
|
||||
import org.nl.acs.ext.wms.data.PalletizeDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ApplyTaskRequest extends BaseRequest {
|
||||
|
||||
@@ -47,4 +50,9 @@ public class ApplyTaskRequest extends BaseRequest {
|
||||
*/
|
||||
private PalletizeDto palletizeDto;
|
||||
|
||||
/**
|
||||
* 关联设备属性
|
||||
*/
|
||||
private List<ApplyDeviceDto> list;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user