分拣拆垛同时码垛完成问题解决,阻盘信息丢失问题解决

This commit is contained in:
zhangjiangwei
2023-03-15 17:10:26 +08:00
parent e234b8782c
commit d58e8f6b41
5 changed files with 253 additions and 240 deletions

View File

@@ -685,6 +685,7 @@ public class LnshPackagePalletManipulatorDeviceDriver extends AbstractOpcDeviceD
log.debug("设备运转模式:等待工作");
return;
case 2:
this.writing(0);
break;
case 4:
//排产单确认
@@ -906,137 +907,136 @@ public class LnshPackagePalletManipulatorDeviceDriver extends AbstractOpcDeviceD
// json.put("vehicle_code",this.autoGenericCode(String.valueOf(barcode)));
HttpResponse result = acsToWmsService.queryCribbingInfo(json);
if (ObjectUtil.isNotEmpty(result)) {
if (ObjectUtil.isEmpty(result.body())) {
if (result.getStatus() == 200) {
JSONObject jsonObject = JSONObject.parseObject(result.body());
JSONObject content = jsonObject.getJSONObject("content");
if (ObjectUtil.isEmpty(content)) {
this.writing(20);
this.setRequireSucess(true);
return true;
}
JSONObject jsonObject = JSONObject.parseObject(result.body());
if (result.getStatus() == 200 && StrUtil.equals(jsonObject.getString("status"),"200")) {
JSONObject content = jsonObject.getJSONObject("content");
} else {
String qty = content.getString("qty");
String material_code = content.getString("material_code");
String material_name = content.getString("material_name");
String product_code = content.getString("product_code");
String AlongSide = content.getString("AlongSide");
String BshortSide = content.getString("BshortSide");
String Htrapezoidal = content.getString("Htrapezoidal");
String Wthickness = content.getString("Wthickness");
String AlongSide = content.getString("alongside");
String BshortSide = content.getString("bshortside");
String Htrapezoidal = content.getString("htrapezoidal");
String Wthickness = content.getString("wthickness");
String tray_qty = content.getString("tray_qty");
String tray_high = content.getString("tray_high");
String crib_category = content.getString("crib_category");
String palletX1_line = content.getString("palletX1_line");
String palletY1_row = content.getString("palletY1_row");
String palletA1_angle = content.getString("palletA1_angle");
String palletX2_line = content.getString("palletX2_line");
String palletY2_row = content.getString("palletY2_row");
String palletA2_angle = content.getString("palletA2_angle");
String palletX3_line = content.getString("palletX3_line");
String palletY3_row = content.getString("palletY3_row");
String palletA3_angle = content.getString("palletA3_angle");
String pressCribX1_line = content.getString("pressCribX1_line");
String pressCribY1_row = content.getString("pressCribY1_row");
String pressCribA1_angle = content.getString("pressCribA1_angle");
String pressCribX2_line = content.getString("pressCribX2_line");
String pressCribY2_row = content.getString("pressCribY2_row");
String pressCribA2_angle = content.getString("pressCribA2_angle");
String pressCribX3_line = content.getString("pressCribX3_line");
String pressCribY3_row = content.getString("pressCribY3_row");
String pressCribA3_angle = content.getString("pressCribA3_angle");
String Zoffset = content.getString("Zoffset");
String pallet_layerQty = content.getString("pallet_layerQty");
String pressCrib_layerQty = content.getString("pressCrib_layerQty");
String codeLayerX1_interval = content.getString("codeLayerX1_interval");
String codeLayerY1_interval = content.getString("codeLayerY1_interval");
String codeLayerX2_interval = content.getString("codeLayerX2_interval");
String codeLayerY2_interval = content.getString("codeLayerY2_interval");
String codeLayerX3_interval = content.getString("codeLayerX3_interval");
String codeLayerY3_interval = content.getString("codeLayerY3_interval");
String codeLayerX1_offset = content.getString("codeLayerX1_offset");
String codeLayerY1_offset = content.getString("codeLayerY1_offset");
String codeLayerX2_offset = content.getString("codeLayerX2_offset");
String codeLayerY2_offset = content.getString("codeLayerY2_offset");
String codeLayerX3_offset = content.getString("codeLayerX3_offset");
String codeLayerY3_offset = content.getString("codeLayerY3_offset");
String pressLayerX1_interval = content.getString("pressLayerX1_interval");
String pressLayerY1_interval = content.getString("pressLayerY1_interval");
String pressLayerX2_interval = content.getString("pressLayerX2_interval");
String pressLayerY2_interval = content.getString("pressLayerY2_interval");
String pressLayerX3_interval = content.getString("pressLayerX3_interval");
String pressLayerY3_interval = content.getString("pressLayerY3_interval");
String pressLayerX1_offset = content.getString("pressLayerX1_offset");
String pressLayerY1_offset = content.getString("pressLayerY1_offset");
String pressLayerX2_offset = content.getString("pressLayerX2_offset");
String pressLayerY2_offset = content.getString("pressLayerY2_offset");
String pressLayerX3_offset = content.getString("pressLayerX3_offset");
String pressLayerY3_offset = content.getString("pressLayerY3_offset");
String one_cribTotal = content.getString("one_cribTotal");
String two_cribTotal = content.getString("two_cribTotal");
String palletX1_line = content.getString("palletx1_line");
String palletY1_row = content.getString("pallety1_row");
String palletA1_angle = content.getString("palleta1_angle");
String palletX2_line = content.getString("palletx2_line");
String palletY2_row = content.getString("pallety2_row");
String palletA2_angle = content.getString("palleta2_angle");
String palletX3_line = content.getString("palletx3_line");
String palletY3_row = content.getString("pallety3_row");
String palletA3_angle = content.getString("palleta3_angle");
String pressCribX1_line = content.getString("presscribx1_line");
String pressCribY1_row = content.getString("presscriby1_row");
String pressCribA1_angle = content.getString("presscriba1_angle");
String pressCribX2_line = content.getString("presscribx2_line");
String pressCribY2_row = content.getString("presscriby2_row");
String pressCribA2_angle = content.getString("presscriba2_angle");
String pressCribX3_line = content.getString("presscribx3_line");
String pressCribY3_row = content.getString("presscriby3_row");
String pressCribA3_angle = content.getString("presscriba3_angle");
String Zoffset = content.getString("zoffset");
String pallet_layerQty = content.getString("pallet_layerqty");
String pressCrib_layerQty = content.getString("presscrib_layerqty");
String codeLayerX1_interval = content.getString("codelayerx1_interval");
String codeLayerY1_interval = content.getString("codelayery1_interval");
String codeLayerX2_interval = content.getString("codelayerx2_interval");
String codeLayerY2_interval = content.getString("codelayery2_interval");
String codeLayerX3_interval = content.getString("codelayerx3_interval");
String codeLayerY3_interval = content.getString("codelayery3_interval");
String codeLayerX1_offset = content.getString("codelayerx1_offset");
String codeLayerY1_offset = content.getString("codelayery1_offset");
String codeLayerX2_offset = content.getString("codelayerx2_offset");
String codeLayerY2_offset = content.getString("codelayery2_offset");
String codeLayerX3_offset = content.getString("codelayerx3_offset");
String codeLayerY3_offset = content.getString("codelayery3_offset");
String pressLayerX1_interval = content.getString("presslayerx1_interval");
String pressLayerY1_interval = content.getString("presslayery1_interval");
String pressLayerX2_interval = content.getString("presslayerx2_interval");
String pressLayerY2_interval = content.getString("presslayery2_interval");
String pressLayerX3_interval = content.getString("presslayerx3_interval");
String pressLayerY3_interval = content.getString("presslayery3_interval");
String pressLayerX1_offset = content.getString("presslayerx1_offset");
String pressLayerY1_offset = content.getString("presslayery1_offset");
String pressLayerX2_offset = content.getString("presslayerx2_offset");
String pressLayerY2_offset = content.getString("presslayery2_offset");
String pressLayerX3_offset = content.getString("presslayerx3_offset");
String pressLayerY3_offset = content.getString("presslayery3_offset");
String one_cribTotal = content.getString("one_cribtotal");
String two_cribTotal = content.getString("two_cribtotal");
String one_qty = content.getString("one_qty");
String two_qty = content.getString("two_qty");
String tool_coordinate = content.getString("tool_coordinate");
this.writing("to_material_qty",qty);
this.writing("to_material_code",material_code);
this.writing("to_product_code",product_code);
this.writing("to_AlongSide",AlongSide);
this.writing("to_BshortSide",BshortSide);
this.writing("to_Htrapezoidal",Htrapezoidal);
this.writing("to_Wthickness",Wthickness);
this.writing("to_tray_qty",qty);
this.writing("to_tray_high",tray_high);
this.writing("to_crib_category",crib_category);
this.writing("to_palletX1_line",palletX1_line);
this.writing("to_palletY1_row",palletY1_row);
this.writing("to_palletA1_angle",palletA1_angle);
this.writing("to_palletX2_line",palletX2_line);
this.writing("to_palletY2_row",palletY2_row);
this.writing("to_palletA2_angle",palletA2_angle);
this.writing("to_palletX3_line",palletX3_line);
this.writing("to_palletY3_row",palletY3_row);
this.writing("to_palletA3_angle",palletA3_angle);
this.writing("to_pressCribX1_line",pressCribX1_line);
this.writing("to_pressCribY1_row",pressCribY1_row);
this.writing("to_pressCribA1_angle",pressCribA1_angle);
this.writing("to_pressCribX2_line",pressCribX2_line);
this.writing("to_pressCribY2_row",pressCribY2_row);
this.writing("to_pressCribA2_angle",pressCribA2_angle);
this.writing("to_pressCribX3_line",pressCribX3_line);
this.writing("to_pressCribY3_row",pressCribY3_row);
this.writing("to_pressCribA3_angle",pressCribA3_angle);
this.writing("to_Zoffset",Zoffset);
this.writing("to_pallet_layerQty",pallet_layerQty);
this.writing("to_pressCrib_layerQty",pressCrib_layerQty);
this.writing("to_codeLayerX1_interval",codeLayerX1_interval);
this.writing("to_codeLayerY1_interval",codeLayerY1_interval);
this.writing("to_codeLayerX2_interval",codeLayerX2_interval);
this.writing("to_codeLayerY2_interval",codeLayerY2_interval);
this.writing("to_codeLayerX3_interval",codeLayerX3_interval);
this.writing("to_codeLayerY3_interval",codeLayerY3_interval);
this.writing("to_codeLayerX1_offset",codeLayerX1_offset);
this.writing("to_codeLayerY1_offset",codeLayerY1_offset);
this.writing("to_codeLayerX2_offset",codeLayerX2_offset);
this.writing("to_codeLayerY2_offset",codeLayerY2_offset);
this.writing("to_codeLayerX3_offset",codeLayerX3_offset);
this.writing("to_codeLayerY3_offset",codeLayerY3_offset);
this.writing("to_pressLayerX1_interval",pressLayerX1_interval);
this.writing("to_pressLayerY1_interval",pressLayerY1_interval);
this.writing("to_pressLayerX2_interval",pressLayerX2_interval);
this.writing("to_pressLayerY2_interval",pressLayerY2_interval);
this.writing("to_pressLayerX3_interval",pressLayerX3_interval);
this.writing("to_pressLayerY3_interval",pressLayerY3_interval);
this.writing("to_pressLayerX1_offset",pressLayerX1_offset);
this.writing("to_pressLayerY1_offset",pressLayerY1_offset);
this.writing("to_pressLayerX2_offset",pressLayerX2_offset);
this.writing("to_pressLayerY2_offset",pressLayerY2_offset);
this.writing("to_pressLayerX3_offset",pressLayerX3_offset);
this.writing("to_pressLayerY3_offset",pressLayerY3_offset);
this.writing("to_one_cribTotal",one_cribTotal);
this.writing("to_two_cribTotal",two_cribTotal);
this.writing("to_one_qty",one_qty);
this.writing("to_two_qty",two_qty);
this.writing("to_tool_coordinate",tool_coordinate);
this.writing("to_material_qty", StrUtil.isEmpty(qty) ? "0" : qty);
this.writing("to_material_code", StrUtil.isEmpty(material_code) ? "0" : material_code);
this.writing("to_product_code", StrUtil.isEmpty(product_code) ? "0" : product_code);
this.writing("to_AlongSide", StrUtil.isEmpty(AlongSide) ? "0" : AlongSide);
this.writing("to_BshortSide", StrUtil.isEmpty(BshortSide) ? "0" : BshortSide);
this.writing("to_Htrapezoidal", StrUtil.isEmpty(Htrapezoidal) ? "0" : Htrapezoidal);
this.writing("to_Wthickness", StrUtil.isEmpty(Wthickness) ? "0" : Wthickness);
this.writing("to_tray_qty", StrUtil.isEmpty(qty) ? "0" : qty);
this.writing("to_tray_high", StrUtil.isEmpty(tray_high) ? "0" : tray_high);
this.writing("to_crib_category", StrUtil.isEmpty(crib_category) ? "0" : crib_category);
this.writing("to_palletX1_line", StrUtil.isEmpty(palletX1_line) ? "0" : palletX1_line);
this.writing("to_palletY1_row", StrUtil.isEmpty(palletY1_row) ? "0" : palletY1_row);
this.writing("to_palletA1_angle", StrUtil.isEmpty(palletA1_angle) ? "0" : palletA1_angle);
this.writing("to_palletX2_line", StrUtil.isEmpty(palletX2_line) ? "0" : palletX2_line);
this.writing("to_palletY2_row", StrUtil.isEmpty(palletY2_row) ? "0" : palletY2_row);
this.writing("to_palletA2_angle", StrUtil.isEmpty(palletA2_angle) ? "0" : palletA2_angle);
this.writing("to_palletX3_line", StrUtil.isEmpty(palletX3_line) ? "0" : palletX3_line);
this.writing("to_palletY3_row", StrUtil.isEmpty(palletY3_row) ? "0" : palletY3_row);
this.writing("to_palletA3_angle", StrUtil.isEmpty(palletA3_angle) ? "0" : palletA3_angle);
this.writing("to_pressCribX1_line", StrUtil.isEmpty(pressCribX1_line) ? "0" : pressCribX1_line);
this.writing("to_pressCribY1_row", StrUtil.isEmpty(pressCribY1_row) ? "0" : pressCribY1_row);
this.writing("to_pressCribA1_angle", StrUtil.isEmpty(pressCribA1_angle) ? "0" : pressCribA1_angle);
this.writing("to_pressCribX2_line", StrUtil.isEmpty(pressCribX2_line) ? "0" : pressCribX2_line);
this.writing("to_pressCribY2_row", StrUtil.isEmpty(pressCribY2_row) ? "0" : pressCribY2_row);
this.writing("to_pressCribA2_angle", StrUtil.isEmpty(pressCribA2_angle) ? "0" : pressCribA2_angle);
this.writing("to_pressCribX3_line", StrUtil.isEmpty(pressCribX3_line) ? "0" : pressCribX3_line);
this.writing("to_pressCribY3_row", StrUtil.isEmpty(pressCribY3_row) ? "0" : pressCribY3_row);
this.writing("to_pressCribA3_angle", StrUtil.isEmpty(pressCribA3_angle) ? "0" : pressCribA3_angle);
this.writing("to_Zoffset", StrUtil.isEmpty(Zoffset) ? "0" : Zoffset);
this.writing("to_pallet_layerQty", StrUtil.isEmpty(pallet_layerQty) ? "0" : pallet_layerQty);
this.writing("to_pressCrib_layerQty", StrUtil.isEmpty(pressCrib_layerQty) ? "0" : pressCrib_layerQty);
this.writing("to_codeLayerX1_interval", StrUtil.isEmpty(codeLayerX1_interval) ? "0" : codeLayerX1_interval);
this.writing("to_codeLayerY1_interval", StrUtil.isEmpty(codeLayerY1_interval) ? "0" : codeLayerY1_interval);
this.writing("to_codeLayerX2_interval", StrUtil.isEmpty(codeLayerX2_interval) ? "0" : codeLayerX2_interval);
this.writing("to_codeLayerY2_interval", StrUtil.isEmpty(codeLayerY2_interval) ? "0" : codeLayerY2_interval);
this.writing("to_codeLayerX3_interval", StrUtil.isEmpty(codeLayerX3_interval) ? "0" : codeLayerX3_interval);
this.writing("to_codeLayerY3_interval", StrUtil.isEmpty(codeLayerY3_interval) ? "0" : codeLayerY3_interval);
this.writing("to_codeLayerX1_offset", StrUtil.isEmpty(codeLayerX1_offset) ? "0" : codeLayerX1_offset);
this.writing("to_codeLayerY1_offset", StrUtil.isEmpty(codeLayerY1_offset) ? "0" : codeLayerY1_offset);
this.writing("to_codeLayerX2_offset", StrUtil.isEmpty(codeLayerX2_offset) ? "0" : codeLayerX2_offset);
this.writing("to_codeLayerY2_offset", StrUtil.isEmpty(codeLayerY2_offset) ? "0" : codeLayerY2_offset);
this.writing("to_codeLayerX3_offset", StrUtil.isEmpty(codeLayerX3_offset) ? "0" : codeLayerX3_offset);
this.writing("to_codeLayerY3_offset", StrUtil.isEmpty(codeLayerY3_offset) ? "0" : codeLayerY3_offset);
this.writing("to_pressLayerX1_interval", StrUtil.isEmpty(pressLayerX1_interval) ? "0" : pressLayerX1_interval);
this.writing("to_pressLayerY1_interval", StrUtil.isEmpty(pressLayerY1_interval) ? "0" : pressLayerY1_interval);
this.writing("to_pressLayerX2_interval", StrUtil.isEmpty(pressLayerX2_interval) ? "0" : pressLayerX2_interval);
this.writing("to_pressLayerY2_interval", StrUtil.isEmpty(pressLayerY2_interval) ? "0" : pressLayerY2_interval);
this.writing("to_pressLayerX3_interval", StrUtil.isEmpty(pressLayerX3_interval) ? "0" : pressLayerX3_interval);
this.writing("to_pressLayerY3_interval", StrUtil.isEmpty(pressLayerY3_interval) ? "0" : pressLayerY3_interval);
this.writing("to_pressLayerX1_offset", StrUtil.isEmpty(pressLayerX1_offset) ? "0" : pressLayerX1_offset);
this.writing("to_pressLayerY1_offset", StrUtil.isEmpty(pressLayerY1_offset) ? "0" : pressLayerY1_offset);
this.writing("to_pressLayerX2_offset", StrUtil.isEmpty(pressLayerX2_offset) ? "0" : pressLayerX2_offset);
this.writing("to_pressLayerY2_offset", StrUtil.isEmpty(pressLayerY2_offset) ? "0" : pressLayerY2_offset);
this.writing("to_pressLayerX3_offset", StrUtil.isEmpty(pressLayerX3_offset) ? "0" : pressLayerX3_offset);
this.writing("to_pressLayerY3_offset", StrUtil.isEmpty(pressLayerY3_offset) ? "0" : pressLayerY3_offset);
this.writing("to_one_cribTotal", StrUtil.isEmpty(one_cribTotal) ? "0" : one_cribTotal);
this.writing("to_two_cribTotal", StrUtil.isEmpty(two_cribTotal) ? "0" : two_cribTotal);
this.writing("to_one_qty", StrUtil.isEmpty(one_qty) ? "0" : one_qty);
this.writing("to_two_qty", StrUtil.isEmpty(two_qty) ? "0" : two_qty);
this.writing("to_tool_coordinate", StrUtil.isEmpty(tool_coordinate) ? "0" : tool_coordinate);
Thread.sleep(1000);
this.writing(this.mode);

View File

@@ -707,6 +707,7 @@ public class RljnPackagePalletSplitManipulatorDeviceDriver extends AbstractOpcDe
log.debug("设备运转模式:等待工作");
return;
case 2:
this.writing(0);
break;
case 4:
//排产单确认
@@ -1140,137 +1141,136 @@ public class RljnPackagePalletSplitManipulatorDeviceDriver extends AbstractOpcDe
json.put("vehicle_code",barcode);
HttpResponse result = acsToWmsService.queryCribbingInfo(json);
if (ObjectUtil.isNotEmpty(result)) {
if (ObjectUtil.isEmpty(result.body())) {
if (result.getStatus() == 200) {
JSONObject jsonObject = JSONObject.parseObject(result.body());
JSONObject content = jsonObject.getJSONObject("content");
if (ObjectUtil.isEmpty(content)) {
this.writing(20);
this.setRequireSucess(true);
return true;
}
JSONObject jsonObject = JSONObject.parseObject(result.body());
if (result.getStatus() == 200 && StrUtil.equals(jsonObject.getString("status"), "200")) {
JSONObject content = jsonObject.getJSONObject("content");
} else {
String qty = content.getString("qty");
String material_code = content.getString("material_code");
String material_name = content.getString("material_name");
String product_code = content.getString("product_code");
String AlongSide = content.getString("AlongSide");
String BshortSide = content.getString("BshortSide");
String Htrapezoidal = content.getString("Htrapezoidal");
String Wthickness = content.getString("Wthickness");
String AlongSide = content.getString("alongside");
String BshortSide = content.getString("bshortside");
String Htrapezoidal = content.getString("htrapezoidal");
String Wthickness = content.getString("wthickness");
String tray_qty = content.getString("tray_qty");
String tray_high = content.getString("tray_high");
String crib_category = content.getString("crib_category");
String palletX1_line = content.getString("palletX1_line");
String palletY1_row = content.getString("palletY1_row");
String palletA1_angle = content.getString("palletA1_angle");
String palletX2_line = content.getString("palletX2_line");
String palletY2_row = content.getString("palletY2_row");
String palletA2_angle = content.getString("palletA2_angle");
String palletX3_line = content.getString("palletX3_line");
String palletY3_row = content.getString("palletY3_row");
String palletA3_angle = content.getString("palletA3_angle");
String pressCribX1_line = content.getString("pressCribX1_line");
String pressCribY1_row = content.getString("pressCribY1_row");
String pressCribA1_angle = content.getString("pressCribA1_angle");
String pressCribX2_line = content.getString("pressCribX2_line");
String pressCribY2_row = content.getString("pressCribY2_row");
String pressCribA2_angle = content.getString("pressCribA2_angle");
String pressCribX3_line = content.getString("pressCribX3_line");
String pressCribY3_row = content.getString("pressCribY3_row");
String pressCribA3_angle = content.getString("pressCribA3_angle");
String Zoffset = content.getString("Zoffset");
String pallet_layerQty = content.getString("pallet_layerQty");
String pressCrib_layerQty = content.getString("pressCrib_layerQty");
String codeLayerX1_interval = content.getString("codeLayerX1_interval");
String codeLayerY1_interval = content.getString("codeLayerY1_interval");
String codeLayerX2_interval = content.getString("codeLayerX2_interval");
String codeLayerY2_interval = content.getString("codeLayerY2_interval");
String codeLayerX3_interval = content.getString("codeLayerX3_interval");
String codeLayerY3_interval = content.getString("codeLayerY3_interval");
String codeLayerX1_offset = content.getString("codeLayerX1_offset");
String codeLayerY1_offset = content.getString("codeLayerY1_offset");
String codeLayerX2_offset = content.getString("codeLayerX2_offset");
String codeLayerY2_offset = content.getString("codeLayerY2_offset");
String codeLayerX3_offset = content.getString("codeLayerX3_offset");
String codeLayerY3_offset = content.getString("codeLayerY3_offset");
String pressLayerX1_interval = content.getString("pressLayerX1_interval");
String pressLayerY1_interval = content.getString("pressLayerY1_interval");
String pressLayerX2_interval = content.getString("pressLayerX2_interval");
String pressLayerY2_interval = content.getString("pressLayerY2_interval");
String pressLayerX3_interval = content.getString("pressLayerX3_interval");
String pressLayerY3_interval = content.getString("pressLayerY3_interval");
String pressLayerX1_offset = content.getString("pressLayerX1_offset");
String pressLayerY1_offset = content.getString("pressLayerY1_offset");
String pressLayerX2_offset = content.getString("pressLayerX2_offset");
String pressLayerY2_offset = content.getString("pressLayerY2_offset");
String pressLayerX3_offset = content.getString("pressLayerX3_offset");
String pressLayerY3_offset = content.getString("pressLayerY3_offset");
String one_cribTotal = content.getString("one_cribTotal");
String two_cribTotal = content.getString("two_cribTotal");
String palletX1_line = content.getString("palletx1_line");
String palletY1_row = content.getString("pallety1_row");
String palletA1_angle = content.getString("palleta1_angle");
String palletX2_line = content.getString("palletx2_line");
String palletY2_row = content.getString("pallety2_row");
String palletA2_angle = content.getString("palleta2_angle");
String palletX3_line = content.getString("palletx3_line");
String palletY3_row = content.getString("pallety3_row");
String palletA3_angle = content.getString("palleta3_angle");
String pressCribX1_line = content.getString("presscribx1_line");
String pressCribY1_row = content.getString("presscriby1_row");
String pressCribA1_angle = content.getString("presscriba1_angle");
String pressCribX2_line = content.getString("presscribx2_line");
String pressCribY2_row = content.getString("presscriby2_row");
String pressCribA2_angle = content.getString("presscriba2_angle");
String pressCribX3_line = content.getString("presscribx3_line");
String pressCribY3_row = content.getString("presscriby3_row");
String pressCribA3_angle = content.getString("presscriba3_angle");
String Zoffset = content.getString("zoffset");
String pallet_layerQty = content.getString("pallet_layerqty");
String pressCrib_layerQty = content.getString("presscrib_layerqty");
String codeLayerX1_interval = content.getString("codelayerx1_interval");
String codeLayerY1_interval = content.getString("codelayery1_interval");
String codeLayerX2_interval = content.getString("codelayerx2_interval");
String codeLayerY2_interval = content.getString("codelayery2_interval");
String codeLayerX3_interval = content.getString("codelayerx3_interval");
String codeLayerY3_interval = content.getString("codelayery3_interval");
String codeLayerX1_offset = content.getString("codelayerx1_offset");
String codeLayerY1_offset = content.getString("codelayery1_offset");
String codeLayerX2_offset = content.getString("codelayerx2_offset");
String codeLayerY2_offset = content.getString("codelayery2_offset");
String codeLayerX3_offset = content.getString("codelayerx3_offset");
String codeLayerY3_offset = content.getString("codelayery3_offset");
String pressLayerX1_interval = content.getString("presslayerx1_interval");
String pressLayerY1_interval = content.getString("presslayery1_interval");
String pressLayerX2_interval = content.getString("presslayerx2_interval");
String pressLayerY2_interval = content.getString("presslayery2_interval");
String pressLayerX3_interval = content.getString("presslayerx3_interval");
String pressLayerY3_interval = content.getString("presslayery3_interval");
String pressLayerX1_offset = content.getString("presslayerx1_offset");
String pressLayerY1_offset = content.getString("presslayery1_offset");
String pressLayerX2_offset = content.getString("presslayerx2_offset");
String pressLayerY2_offset = content.getString("presslayery2_offset");
String pressLayerX3_offset = content.getString("presslayerx3_offset");
String pressLayerY3_offset = content.getString("presslayery3_offset");
String one_cribTotal = content.getString("one_cribtotal");
String two_cribTotal = content.getString("two_cribtotal");
String one_qty = content.getString("one_qty");
String two_qty = content.getString("two_qty");
String tool_coordinate = content.getString("tool_coordinate");
this.writing("to_material_qty", qty);
this.writing("to_material_code", material_code);
this.writing("to_product_code", product_code);
this.writing("to_AlongSide", AlongSide);
this.writing("to_BshortSide", BshortSide);
this.writing("to_Htrapezoidal", Htrapezoidal);
this.writing("to_Wthickness", Wthickness);
this.writing("to_tray_qty", qty);
this.writing("to_tray_high", tray_high);
this.writing("to_crib_category", crib_category);
this.writing("to_palletX1_line", palletX1_line);
this.writing("to_palletY1_row", palletY1_row);
this.writing("to_palletA1_angle", palletA1_angle);
this.writing("to_palletX2_line", palletX2_line);
this.writing("to_palletY2_row", palletY2_row);
this.writing("to_palletA2_angle", palletA2_angle);
this.writing("to_palletX3_line", palletX3_line);
this.writing("to_palletY3_row", palletY3_row);
this.writing("to_palletA3_angle", palletA3_angle);
this.writing("to_pressCribX1_line", pressCribX1_line);
this.writing("to_pressCribY1_row", pressCribY1_row);
this.writing("to_pressCribA1_angle", pressCribA1_angle);
this.writing("to_pressCribX2_line", pressCribX2_line);
this.writing("to_pressCribY2_row", pressCribY2_row);
this.writing("to_pressCribA2_angle", pressCribA2_angle);
this.writing("to_pressCribX3_line", pressCribX3_line);
this.writing("to_pressCribY3_row", pressCribY3_row);
this.writing("to_pressCribA3_angle", pressCribA3_angle);
this.writing("to_Zoffset", Zoffset);
this.writing("to_pallet_layerQty", pallet_layerQty);
this.writing("to_pressCrib_layerQty", pressCrib_layerQty);
this.writing("to_codeLayerX1_interval", codeLayerX1_interval);
this.writing("to_codeLayerY1_interval", codeLayerY1_interval);
this.writing("to_codeLayerX2_interval", codeLayerX2_interval);
this.writing("to_codeLayerY2_interval", codeLayerY2_interval);
this.writing("to_codeLayerX3_interval", codeLayerX3_interval);
this.writing("to_codeLayerY3_interval", codeLayerY3_interval);
this.writing("to_codeLayerX1_offset", codeLayerX1_offset);
this.writing("to_codeLayerY1_offset", codeLayerY1_offset);
this.writing("to_codeLayerX2_offset", codeLayerX2_offset);
this.writing("to_codeLayerY2_offset", codeLayerY2_offset);
this.writing("to_codeLayerX3_offset", codeLayerX3_offset);
this.writing("to_codeLayerY3_offset", codeLayerY3_offset);
this.writing("to_pressLayerX1_interval", pressLayerX1_interval);
this.writing("to_pressLayerY1_interval", pressLayerY1_interval);
this.writing("to_pressLayerX2_interval", pressLayerX2_interval);
this.writing("to_pressLayerY2_interval", pressLayerY2_interval);
this.writing("to_pressLayerX3_interval", pressLayerX3_interval);
this.writing("to_pressLayerY3_interval", pressLayerY3_interval);
this.writing("to_pressLayerX1_offset", pressLayerX1_offset);
this.writing("to_pressLayerY1_offset", pressLayerY1_offset);
this.writing("to_pressLayerX2_offset", pressLayerX2_offset);
this.writing("to_pressLayerY2_offset", pressLayerY2_offset);
this.writing("to_pressLayerX3_offset", pressLayerX3_offset);
this.writing("to_pressLayerY3_offset", pressLayerY3_offset);
this.writing("to_one_cribTotal", one_cribTotal);
this.writing("to_two_cribTotal", two_cribTotal);
this.writing("to_one_qty", one_qty);
this.writing("to_two_qty", two_qty);
this.writing("to_tool_coordinate", tool_coordinate);
this.writing("to_material_qty", StrUtil.isEmpty(qty) ? "0" : qty);
this.writing("to_material_code", StrUtil.isEmpty(material_code) ? "0" : material_code );
this.writing("to_product_code", StrUtil.isEmpty(product_code) ? "0" : product_code );
this.writing("to_AlongSide", StrUtil.isEmpty(AlongSide) ? "0" : AlongSide );
this.writing("to_BshortSide", StrUtil.isEmpty(BshortSide) ? "0" : BshortSide );
this.writing("to_Htrapezoidal", StrUtil.isEmpty(Htrapezoidal) ? "0" : Htrapezoidal );
this.writing("to_Wthickness", StrUtil.isEmpty(Wthickness) ? "0" : Wthickness );
this.writing("to_tray_qty", StrUtil.isEmpty(qty) ? "0" : qty );
this.writing("to_tray_high", StrUtil.isEmpty(tray_high) ? "0" : tray_high );
this.writing("to_crib_category", StrUtil.isEmpty(crib_category) ? "0" : crib_category );
this.writing("to_palletX1_line", StrUtil.isEmpty(palletX1_line) ? "0" : palletX1_line );
this.writing("to_palletY1_row", StrUtil.isEmpty(palletY1_row) ? "0" : palletY1_row );
this.writing("to_palletA1_angle", StrUtil.isEmpty(palletA1_angle) ? "0" : palletA1_angle );
this.writing("to_palletX2_line", StrUtil.isEmpty(palletX2_line) ? "0" : palletX2_line );
this.writing("to_palletY2_row", StrUtil.isEmpty(palletY2_row) ? "0" : palletY2_row );
this.writing("to_palletA2_angle", StrUtil.isEmpty(palletA2_angle) ? "0" : palletA2_angle );
this.writing("to_palletX3_line", StrUtil.isEmpty(palletX3_line) ? "0" : palletX3_line );
this.writing("to_palletY3_row", StrUtil.isEmpty(palletY3_row) ? "0" : palletY3_row );
this.writing("to_palletA3_angle", StrUtil.isEmpty(palletA3_angle) ? "0" : palletA3_angle );
this.writing("to_pressCribX1_line", StrUtil.isEmpty(pressCribX1_line) ? "0" : pressCribX1_line );
this.writing("to_pressCribY1_row", StrUtil.isEmpty(pressCribY1_row) ? "0" : pressCribY1_row );
this.writing("to_pressCribA1_angle", StrUtil.isEmpty(pressCribA1_angle) ? "0" : pressCribA1_angle );
this.writing("to_pressCribX2_line", StrUtil.isEmpty(pressCribX2_line) ? "0" : pressCribX2_line );
this.writing("to_pressCribY2_row", StrUtil.isEmpty(pressCribY2_row) ? "0" : pressCribY2_row );
this.writing("to_pressCribA2_angle", StrUtil.isEmpty(pressCribA2_angle) ? "0" : pressCribA2_angle );
this.writing("to_pressCribX3_line", StrUtil.isEmpty(pressCribX3_line) ? "0" : pressCribX3_line );
this.writing("to_pressCribY3_row", StrUtil.isEmpty(pressCribY3_row) ? "0" : pressCribY3_row );
this.writing("to_pressCribA3_angle", StrUtil.isEmpty(pressCribA3_angle) ? "0" : pressCribA3_angle );
this.writing("to_Zoffset", StrUtil.isEmpty(Zoffset) ? "0" : Zoffset );
this.writing("to_pallet_layerQty", StrUtil.isEmpty(pallet_layerQty) ? "0" : pallet_layerQty );
this.writing("to_pressCrib_layerQty", StrUtil.isEmpty(pressCrib_layerQty) ? "0" : pressCrib_layerQty );
this.writing("to_codeLayerX1_interval", StrUtil.isEmpty(codeLayerX1_interval) ? "0" : codeLayerX1_interval );
this.writing("to_codeLayerY1_interval", StrUtil.isEmpty(codeLayerY1_interval) ? "0" : codeLayerY1_interval );
this.writing("to_codeLayerX2_interval", StrUtil.isEmpty(codeLayerX2_interval) ? "0" : codeLayerX2_interval );
this.writing("to_codeLayerY2_interval", StrUtil.isEmpty(codeLayerY2_interval) ? "0" : codeLayerY2_interval );
this.writing("to_codeLayerX3_interval", StrUtil.isEmpty(codeLayerX3_interval) ? "0" : codeLayerX3_interval );
this.writing("to_codeLayerY3_interval", StrUtil.isEmpty(codeLayerY3_interval) ? "0" : codeLayerY3_interval );
this.writing("to_codeLayerX1_offset", StrUtil.isEmpty(codeLayerX1_offset) ? "0" : codeLayerX1_offset );
this.writing("to_codeLayerY1_offset", StrUtil.isEmpty(codeLayerY1_offset) ? "0" : codeLayerY1_offset );
this.writing("to_codeLayerX2_offset", StrUtil.isEmpty(codeLayerX2_offset) ? "0" : codeLayerX2_offset );
this.writing("to_codeLayerY2_offset", StrUtil.isEmpty(codeLayerY2_offset) ? "0" : codeLayerY2_offset );
this.writing("to_codeLayerX3_offset", StrUtil.isEmpty(codeLayerX3_offset) ? "0" : codeLayerX3_offset );
this.writing("to_codeLayerY3_offset", StrUtil.isEmpty(codeLayerY3_offset) ? "0" : codeLayerY3_offset );
this.writing("to_pressLayerX1_interval", StrUtil.isEmpty(pressLayerX1_interval) ? "0" : pressLayerX1_interval );
this.writing("to_pressLayerY1_interval", StrUtil.isEmpty(pressLayerY1_interval) ? "0" : pressLayerY1_interval );
this.writing("to_pressLayerX2_interval", StrUtil.isEmpty(pressLayerX2_interval) ? "0" : pressLayerX2_interval );
this.writing("to_pressLayerY2_interval", StrUtil.isEmpty(pressLayerY2_interval) ? "0" : pressLayerY2_interval );
this.writing("to_pressLayerX3_interval", StrUtil.isEmpty(pressLayerX3_interval) ? "0" : pressLayerX3_interval );
this.writing("to_pressLayerY3_interval", StrUtil.isEmpty(pressLayerY3_interval) ? "0" : pressLayerY3_interval );
this.writing("to_pressLayerX1_offset", StrUtil.isEmpty(pressLayerX1_offset) ? "0" : pressLayerX1_offset );
this.writing("to_pressLayerY1_offset", StrUtil.isEmpty(pressLayerY1_offset) ? "0" : pressLayerY1_offset );
this.writing("to_pressLayerX2_offset", StrUtil.isEmpty(pressLayerX2_offset) ? "0" : pressLayerX2_offset );
this.writing("to_pressLayerY2_offset", StrUtil.isEmpty(pressLayerY2_offset) ? "0" : pressLayerY2_offset );
this.writing("to_pressLayerX3_offset", StrUtil.isEmpty(pressLayerX3_offset) ? "0" : pressLayerX3_offset );
this.writing("to_pressLayerY3_offset", StrUtil.isEmpty(pressLayerY3_offset) ? "0" : pressLayerY3_offset );
this.writing("to_one_cribTotal", StrUtil.isEmpty(one_cribTotal) ? "0" : one_cribTotal );
this.writing("to_two_cribTotal", StrUtil.isEmpty(two_cribTotal) ? "0" : two_cribTotal );
this.writing("to_one_qty", StrUtil.isEmpty(one_qty) ? "0" : one_qty );
this.writing("to_two_qty", StrUtil.isEmpty(two_qty) ? "0" : two_qty );
this.writing("to_tool_coordinate", StrUtil.isEmpty(tool_coordinate) ? "0" : tool_coordinate );
Thread.sleep(1000);
this.writing(this.mode);

View File

@@ -161,6 +161,7 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
}
device = deviceAppService.findDeviceByCode(device_code);
}
logServer.deviceExecuteLog("ndc", "","","接收agv上报设备" + device_code);
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver;
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
StandardCoveyorControlDeviceDriver standardCoveyorControlDeviceDriver;

View File

@@ -479,7 +479,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
//将之前的托盘信息删除
// groupTable.delete("vehicle_code='" + vehicle_code + "' and task_id <>'" + task_id + "'");
// 如果是送料任务需要反向组盘
if (SendMaterialTask.class.getName().equals(taskobj.getString("handle_class"))) {
String handle_class = taskobj.getString("handle_class");
if (SendMaterialTask.class.getName().equals(handle_class) || ToConveyorTask.class.getName().equals(handle_class)) {
JSONObject groupObj = groupTable.query("task_id='" + task_id + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(groupObj)) {
groupObj.put("vehicle_code", vehicle_code);
@@ -898,6 +899,13 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
public Map<String, Object> queryCribbingInfo(Map jsonObject) {
log.debug("ACS的queryCribbingInfo请求参数为:" + jsonObject);
String device_code = (String) jsonObject.get("device_code");
JSONObject task = WQLObject
.getWQLObject("sch_base_task")
.query("is_delete = '0' AND task_status <> '07' AND next_point_code = '" + device_code + "'")
.uniqueResult(0);
if (ObjectUtil.isNotEmpty(task)) {
throw new BadRequestException("当前点位有空托任务未完成!");
}
WQLObject pointTable = WQLObject.getWQLObject("sch_base_point");
JSONObject produceInfoByCode = this.getProduceInfoByCode(device_code);
//根据点位获取排产单
@@ -914,7 +922,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
//从组盘表里面去获取
result = group_table.query("vehicle_code = '" + vehicle_code + "'").uniqueResult(0);
}
return result;
JSONObject resultJSON = new JSONObject();
resultJSON.put("content", result);
resultJSON.put("status", HttpStatus.OK.value());
resultJSON.put("message", "托盘信息反馈成功");
return resultJSON;
}

View File

@@ -91,6 +91,10 @@ public class SendEmptyVehicleTask extends AbstractAcsTask {
startPointObj.put("vehicle_code", "");
pointTab.update(startPointObj);
taskTab.update(jsonTask);
//将组盘表删除
WQLObject.getWQLObject("st_buss_vehiclegroup")
.delete("vehicle_code = '" + vehicle_code + "'");
}
}
@@ -198,10 +202,6 @@ public class SendEmptyVehicleTask extends AbstractAcsTask {
taskObj.put("is_delete", "0");
taskTable.insert(taskObj);
//将组盘表删除
WQLObject.getWQLObject("st_buss_vehiclegroup")
.delete("vehicle_code = '" + vehicle_code + "'");
return task_id;
}