@@ -115,8 +115,8 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl
String item_out_seq_arr = null ;
String last_item_out_seq_arr = null ;
//出库数量数组
int [ ] item_out_qty_arr = null ;
int [ ] last_item_out_qty_arr = null ;
String item_out_qty_arr = null ;
String last_item_out_qty_arr = null ;
String item_material1 = null ;
@@ -469,7 +469,7 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl
}
public synchronized void request_for_shipment ( String mode , String item_out_seq_arr , int [ ] item_out_qty_arr ) {
public synchronized void request_for_shipment ( String mode , String item_out_seq_arr , String item_out_qty_arr ) {
Date date = new Date ( ) ;
if ( date . getTime ( ) - this . require_apply_strangulation_time . getTime ( ) < ( long ) this . instruction_require_time_out ) {
log . trace ( " 触发时间因为小于{}毫秒,而被无视 " , this . instruction_require_time_out ) ;
@@ -486,17 +486,26 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl
if ( contains ) {
String [ ] split = item_out_seq_arr . split ( " , " ) ;
applyPaperActionRequest . setMaterial1 ( split [ 0 ] ) ;
applyPaperActionRequest . setMaterial1 ( split [ 1 ] ) ;
applyPaperActionRequest . setMaterial2 ( split [ 1 ] ) ;
} else if ( contains1 ) {
String [ ] split = item_out_seq_arr . split ( " , " ) ;
applyPaperActionRequest . setMaterial1 ( split [ 0 ] ) ;
applyPaperActionRequest . setMaterial1 ( split [ 1 ] ) ;
applyPaperActionRequest . setMaterial2 ( split [ 1 ] ) ;
} else {
applyPaperActionRequest . setMaterial1 ( item_out_seq_arr ) ;
}
if ( item_out_qty_arr . length > = 1 & & item_out_qty_arr . length < 4 ) {
applyPaperActionRequest . setQty1 ( String . valueOf ( item_out_qty_arr [ 0 ] ) ) ;
applyPaperActionRequest . setQty2 ( String . valueOf ( item_out_qty_arr [ 1 ] ) ) ;
boolean contains2 = item_out_qty_arr . contains ( " , " ) ;
boolean contains3 = item_out_qty_arr . contains ( " , " ) ;
if ( contains2 ) {
String [ ] split = item_out_qty_arr . split ( " , " ) ;
applyPaperActionRequest . setQty1 ( split [ 0 ] ) ;
applyPaperActionRequest . setQty2 ( split [ 1 ] ) ;
} else if ( contains3 ) {
String [ ] split = item_out_qty_arr . split ( " , " ) ;
applyPaperActionRequest . setQty1 ( split [ 0 ] ) ;
applyPaperActionRequest . setQty2 ( split [ 1 ] ) ;
} else {
applyPaperActionRequest . setQty1 ( item_out_qty_arr ) ;
}
ApplyPaperActionResponse applyPaperActionResponse = acsToWmsService . applyPaperActionRequest ( applyPaperActionRequest ) ;
if ( ObjectUtil . isNull ( applyPaperActionResponse ) ) {
@@ -609,7 +618,7 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl
instructionService . create ( instdto ) ;
} catch ( Exception e ) {
e . printStackTrace ( ) ;
log . error ( " 指令创建失败! " , e . getMessage ( ) ) ;
log . error ( " 指令创建失败!{} " , e . getMessage ( ) ) ;
return false ;
}
taskdto . setTask_status ( " 1 " ) ;
@@ -744,6 +753,8 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl
map . put ( " error " , ErrorUtil . getDictDetail ( " ssx_error_type " , String . valueOf ( this . getError ( ) ) ) ) ;
map . put ( " move " , move ) ;
map . put ( " isOnline " , this . getIsonline ( ) ) ;
map . put ( " out_seq_arr " , this . getItem_out_seq_arr ( ) ) ;
map . put ( " out_qty_arr " , this . getItem_out_qty_arr ( ) ) ;
map . put ( " material1 " , this . getItem_material1 ( ) ) ;
map . put ( " z_qty1 " , this . getItem_qty1 ( ) ) ;
map . put ( " material2 " , this . getItem_material2 ( ) ) ;
@@ -769,6 +780,7 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl
map . put ( " material12 " , this . getItem_material12 ( ) ) ;
map . put ( " z_qty12 " , this . getItem_qty12 ( ) ) ;
JSONObject jo = new JSONObject ( map ) ;
return jo ;
}
@@ -833,8 +845,8 @@ public class PaperTubeConveyor2DeviceDriver extends AbstractOpcDeviceDriver impl
if ( ! item_out_seq_arr . equals ( last_item_out_seq_arr ) ) {
logServer . deviceExecuteLog ( this . device_code , " " , " " , " 信号item_out_seq_arr: " + last_item_out_seq_arr + " -> " + item_out_seq_arr ) ;
}
if ( ! arrayEquals ( item_out_qty_arr, last_item_out_qty_arr ) ) {
logServer . deviceExecuteLog ( this . device_code , " " , " " , " 信号item_out_qty_arr: " + Arrays . toString ( last_item_out_qty_arr) + " -> " + Arrays . toString ( item_out_qty_arr) ) ;
if ( ! item_out_qty_arr . equals ( last_item_out_qty_arr ) ) {
logServer . deviceExecuteLog ( this . device_code , " " , " " , " 信号item_out_qty_arr: " + last_item_out_qty_arr + " -> " + item_out_qty_arr ) ;
}
if ( item_qty1 ! = ( last_item_qty1 ) ) {
logServer . deviceExecuteLog ( this . device_code , " " , " " , " 信号qty1: " + last_item_qty1 + " -> " + item_qty1 ) ;