代码更新
This commit is contained in:
@@ -840,14 +840,36 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
||||
String placement_type = row_jo.getString("placement_type");
|
||||
|
||||
if (placement_type.equals("02")) {
|
||||
// 左通
|
||||
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);
|
||||
} else {
|
||||
} else if(placement_type.equals("03")) {
|
||||
// 右通
|
||||
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);
|
||||
} else {
|
||||
// 双通
|
||||
// 先倒序找到第一个木箱、判断上一个是否有货位
|
||||
JSONObject jsonDescBox = 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);
|
||||
String out_order_seq = jsonDescBox.getString("out_order_seq");
|
||||
// 上一个货位顺序号
|
||||
String out_order_seq_desc = String.valueOf(NumberUtil.add(out_order_seq, "1"));
|
||||
JSONObject 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_desc+"'").uniqueResult(0);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(jsonDescStruct)) {
|
||||
struct_jo = jsonDescStruct;
|
||||
} else {
|
||||
// 没有就正序找到第一个物料、判断上一个是否有货位
|
||||
JSONObject jsonAscBox = 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);
|
||||
String out_order_seq2 = jsonAscBox.getString("out_order_seq");
|
||||
// 上一个货位顺序号
|
||||
String out_order_seq_asc = String.valueOf(NumberUtil.sub(out_order_seq2, "1"));
|
||||
JSONObject 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_seq_asc+"'").uniqueResult(0);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(jsonAscStruct)) struct_jo = jsonAscStruct;
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
//如果不存在相同订单物料的巷道
|
||||
|
||||
|
||||
/*//查询是否存在未完成的相同订单物流的入库单,如果存在则查询该排是否存在可用的仓位
|
||||
HashMap<String,String> io_map = new HashMap<>();
|
||||
io_map.put("flag","12");
|
||||
|
||||
Reference in New Issue
Block a user