JSONArrayisLock=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type not in ('1','2','7') AND block_num = '"+block_num+"'AND placement_type = '"+placement_type+"' AND row_num = '"+row_num+"' AND is_delete = '0' AND is_used = '1'").getResultJSONArray(0);
struct_jo=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '"+block_num+"'AND placement_type = '"+placement_type+"' AND row_num = '"+row_num+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' order by out_order_seq ASC").uniqueResult(0);
@ -1847,11 +1881,17 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
break;
break;
}elseif("03".equals(placement_type)){
}elseif("03".equals(placement_type)){
// 右通
// 右通
struct_jo=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '"+block_num+"'AND placement_type = '"+placement_type+"' AND row_num = '"+row_num+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' order by out_order_seq DESC").uniqueResult(0);
@ -1861,28 +1901,60 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
// 双通
// 双通
// 先倒序找到第一个木箱、判断上一个是否有货位
// 先倒序找到第一个木箱、判断上一个是否有货位
JSONObjectjsonDescBox=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '"+block_num+"'AND placement_type = '"+placement_type+"' AND row_num = '"+row_num+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') <> '' order by out_order_seq DESC").uniqueResult(0);
jsonDescStruct=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '"+block_num+"'AND placement_type = '"+placement_type+"' AND row_num = '"+row_num+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' and out_order_seq > '"+out_order_seq+"' order by out_order_seq ASC").uniqueResult(0);
JSONObjectjsonDescEmpStruct=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type in ('2','7') AND block_num = '"+block_num+"'AND placement_type = '"+placement_type+"' AND row_num = '"+row_num+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' order by out_order_seq DESC").uniqueResult(0);
jsonDescStruct=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '"+block_num+"'AND placement_type = '"+placement_type+"' AND row_num = '"+row_num+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' and out_order_seq > '"+out_order_seq+"' order by out_order_seq ASC").uniqueResult(0);
@ -1890,19 +1962,51 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
break;
break;
}else{
}else{
// 没有就正序找到第一个物料、判断上一个是否有货位
// 没有就正序找到第一个物料、判断上一个是否有货位
JSONObjectjsonAscBox=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '"+block_num+"'AND placement_type = '"+placement_type+"' AND row_num = '"+row_num+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') <> '' order by out_order_seq ASC").uniqueResult(0);
jsonAscStruct=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '"+block_num+"'AND placement_type = '"+placement_type+"' AND row_num = '"+row_num+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' and out_order_seq < '"+out_order_seq2+"' order by out_order_seq DESC").uniqueResult(0);
JSONObjectjsonAscEmpStruct=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type in ('2','7') AND block_num = '"+block_num+"'AND placement_type = '"+placement_type+"' AND row_num = '"+row_num+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' order by out_order_seq ASC").uniqueResult(0);
jsonAscStruct=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '"+block_num+"'AND placement_type = '"+placement_type+"' AND row_num = '"+row_num+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' and out_order_seq < '"+out_order_seq2+"' order by out_order_seq DESC").uniqueResult(0);
struct_jo=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '"+block_num2+"' AND row_num = '"+row_num2+"' AND placement_type = '"+placement_type2+"' AND is_delete = '0' AND is_used = '1' AND lock_type = '1' order by out_order_seq ASC").uniqueResult(0);
struct_jo=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '"+block_num2+"' AND row_num = '"+row_num2+"' AND placement_type = '"+placement_type2+"'AND is_delete = '0' AND is_used = '1' AND lock_type = '1' order by out_order_seq DESC").uniqueResult(0);
@ -1973,23 +2076,69 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
Stringblock_num3=have_row.getString("block_num");
Stringblock_num3=have_row.getString("block_num");
Stringrow_num3=have_row.getString("row_num");
Stringrow_num3=have_row.getString("row_num");
JSONArrayisLock2=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type not in ('1','2','7') AND block_num = '"+block_num3+"' AND row_num = '"+row_num3+"' AND is_delete = '0' AND is_used = '1'").getResultJSONArray(0);
JSONObjectjsonDescBox2=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '"+block_num3+"' AND row_num = '"+row_num3+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') <> '' order by out_order_seq DESC").uniqueResult(0);
jsonDescStruct2=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '"+block_num3+"' AND row_num = '"+row_num3+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' and out_order_seq > '"+out_order_seq+"' order by out_order_seq ASC").uniqueResult(0);
JSONObjectjsonDescEmpStruct=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type in ('2','7') AND block_num = '"+block_num3+"' AND row_num = '"+row_num3+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' order by out_order_seq DESC").uniqueResult(0);
jsonDescStruct2=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '"+block_num3+"' AND row_num = '"+row_num3+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' and out_order_seq > '"+out_order_seq+"' order by out_order_seq ASC").uniqueResult(0);
@ -2006,28 +2155,62 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
break;
break;
}else{
}else{
// 没有就正序找到第一个物料、判断上一个是否有货位
// 没有就正序找到第一个物料、判断上一个是否有货位
JSONObjectjsonAscBox2=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '"+block_num3+"' AND row_num = '"+row_num3+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') <> '' order by out_order_seq ASC").uniqueResult(0);
jsonAscStruct2=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '"+block_num3+"' AND row_num = '"+row_num3+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' and out_order_seq < '"+out_order_seq2+"' order by out_order_seq DESC").uniqueResult(0);
JSONObjectjsonAscEmpStruct=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type in ('2','7') AND block_num = '"+block_num3+"' AND row_num = '"+row_num3+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' order by out_order_seq ASC").uniqueResult(0);
jsonAscStruct2=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '"+block_num3+"' AND row_num = '"+row_num3+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' and out_order_seq < '"+out_order_seq2+"' order by out_order_seq DESC").uniqueResult(0);
struct_jo=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '"+block_num+"' AND row_num = '"+row_num+"' AND placement_type = '"+placement_type+"' AND is_delete = '0' AND is_used = '1' AND lock_type = '1' order by out_order_seq ASC").uniqueResult(0);
queryWrapper.eq(Structattr::getLock_type,"1")
}else{
.eq(Structattr::getBlock_num,block_num)
struct_jo=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '"+block_num+"' AND row_num = '"+row_num+"' AND placement_type = '"+placement_type+"'AND is_delete = '0' AND is_used = '1' AND lock_type = '1' order by out_order_seq DESC").uniqueResult(0);
@ -2093,23 +2284,68 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
Stringblock_num3=have_row.getString("block_num");
Stringblock_num3=have_row.getString("block_num");
Stringrow_num3=have_row.getString("row_num");
Stringrow_num3=have_row.getString("row_num");
JSONArrayisLock2=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type not in ('1','2','7') AND block_num = '"+block_num3+"' AND row_num = '"+row_num3+"' AND is_delete = '0' AND is_used = '1'").getResultJSONArray(0);
JSONObjectjsonDescBox2=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '"+block_num3+"' AND row_num = '"+row_num3+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') <> '' order by out_order_seq DESC").uniqueResult(0);
jsonDescStruct2=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '"+block_num3+"' AND row_num = '"+row_num3+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' and out_order_seq > '"+out_order_seq+"' order by out_order_seq ASC").uniqueResult(0);
JSONObjectjsonDescEmpStruct=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type in ('2','7') AND block_num = '"+block_num3+"' AND row_num = '"+row_num3+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' order by out_order_seq DESC").uniqueResult(0);
jsonDescStruct2=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '"+block_num3+"' AND row_num = '"+row_num3+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' and out_order_seq > '"+out_order_seq+"' order by out_order_seq ASC").uniqueResult(0);
@ -2126,19 +2362,50 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
break;
break;
}else{
}else{
// 没有就正序找到第一个物料、判断上一个是否有货位
// 没有就正序找到第一个物料、判断上一个是否有货位
JSONObjectjsonAscBox2=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '"+block_num3+"' AND row_num = '"+row_num3+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') <> '' order by out_order_seq ASC").uniqueResult(0);
jsonAscStruct2=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '"+block_num3+"' AND row_num = '"+row_num3+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' and out_order_seq < '"+out_order_seq2+"' order by out_order_seq DESC").uniqueResult(0);
JSONObjectjsonAscEmpStruct=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type in ('2','7') AND block_num = '"+block_num3+"' AND row_num = '"+row_num3+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' order by out_order_seq ASC").uniqueResult(0);
jsonAscStruct2=WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '"+block_num3+"' AND row_num = '"+row_num3+"' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' and out_order_seq < '"+out_order_seq2+"' order by out_order_seq DESC").uniqueResult(0);