修改
This commit is contained in:
@@ -25,15 +25,15 @@ public class EmptyVehicleController {
|
||||
private final EmptyVehicleService emptyVehicleService;
|
||||
|
||||
@PostMapping("/pointStatusQuery")
|
||||
@Log("分切计划初始化查询")
|
||||
@ApiOperation("分切计划初始化查询")
|
||||
@Log("点位载具查询")
|
||||
@ApiOperation("点位载具查询")
|
||||
public ResponseEntity<Object> pointStatusQuery(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(emptyVehicleService.pointStatusQuery(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/pointOperate")
|
||||
@Log("子卷出站")
|
||||
@ApiOperation("子卷出站")
|
||||
@Log("解绑绑定")
|
||||
@ApiOperation("解绑绑定")
|
||||
public ResponseEntity<Object> pointOperate(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(emptyVehicleService.pointOperate(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -25,11 +25,48 @@ public class EmptyVehicleServiceImpl implements EmptyVehicleService {
|
||||
|
||||
@Override
|
||||
public JSONObject pointStatusQuery(JSONObject whereJson) {
|
||||
return null;
|
||||
String point_code = whereJson.getString("point_code");
|
||||
if (StrUtil.isEmpty(point_code)){
|
||||
throw new BadRequestException("点位不能为空!");
|
||||
}
|
||||
JSONObject point_jo = WQLObject.getWQLObject("st_ivt_coolpointivt").query("empty_point_code = '"+point_code+"'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(point_jo)){
|
||||
throw new BadRequestException("未查询到对应的点位设备!");
|
||||
}
|
||||
String empty_vehicle_code = point_jo.getString("empty_vehicle_code");
|
||||
JSONObject vehicle_jo = new JSONObject();
|
||||
vehicle_jo.put("vehicle_code",empty_vehicle_code);
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("data",vehicle_jo);
|
||||
jo.put("message","操作成功!");
|
||||
return jo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject pointOperate(JSONObject whereJson) {
|
||||
return null;
|
||||
String point_code = whereJson.getString("point_code");
|
||||
String vehicle_code = whereJson.getString("vehicle_code");
|
||||
if (StrUtil.isEmpty(point_code)){
|
||||
throw new BadRequestException("点位不能为空!");
|
||||
}
|
||||
if (StrUtil.isEmpty(vehicle_code)){
|
||||
throw new BadRequestException("载具码不能为空!");
|
||||
}
|
||||
|
||||
String option = whereJson.getString("option");
|
||||
JSONObject point_jo = WQLObject.getWQLObject("st_ivt_coolpointivt").query("empty_point_code = '"+point_code+"'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(point_jo)){
|
||||
throw new BadRequestException("未查询到对应的点位设备!");
|
||||
}
|
||||
if (option.equals("0")){
|
||||
point_jo.put("empty_vehicle_code","");
|
||||
}
|
||||
if (option.equals("1")){
|
||||
point_jo.put("empty_vehicle_code",vehicle_code);
|
||||
}
|
||||
WQLObject.getWQLObject("st_ivt_coolpointivt").update(point_jo);
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("message","操作成功!");
|
||||
return jo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -814,9 +814,9 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
||||
String placement_type = row_jo.getString("placement_type");
|
||||
|
||||
if (placement_type.equals("01") || placement_type.equals("03")) {
|
||||
struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("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);
|
||||
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 {
|
||||
struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("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").uniqueResult(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").uniqueResult(0);
|
||||
}
|
||||
} else {
|
||||
//如果不存在相同订单物料的巷道
|
||||
@@ -842,9 +842,9 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
||||
String placement_type = empty_row.getString("placement_type");
|
||||
|
||||
if (placement_type.equals("01") || placement_type.equals("03")) {
|
||||
struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("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);
|
||||
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);
|
||||
} else {
|
||||
struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("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").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").uniqueResult(0);
|
||||
}
|
||||
} else {
|
||||
//如果查询不到空的一排,则查询有空位双通的一排
|
||||
@@ -858,10 +858,10 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
||||
JSONObject right_str = WQLObject.getWQLObject("st_ivt_structattr").query("block_num = '" + block_num + "' AND row_num = '" + row_num + "' AND is_delete = '0' AND is_used = '1' order by out_order_seq").uniqueResult(0);
|
||||
JSONObject left_str = WQLObject.getWQLObject("st_ivt_structattr").query("block_num = '" + block_num + "' AND row_num = '" + row_num + "' AND is_delete = '0' AND is_used = '1' order by out_order_seq desc").uniqueResult(0);
|
||||
if (StrUtil.isNotEmpty(right_str.getString("storagevehicle_code")) || !right_str.getString("lock_type").equals("1")){
|
||||
struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("block_num = '" + block_num + "' AND row_num = '" + row_num + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' order by out_order_seq").uniqueResult(0);
|
||||
struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num + "' AND row_num = '" + row_num + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' order by out_order_seq").uniqueResult(0);
|
||||
}
|
||||
if (StrUtil.isNotEmpty(left_str.getString("storagevehicle_code")) || !left_str.getString("lock_type").equals("1")){
|
||||
struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("block_num = '" + block_num + "' 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);
|
||||
struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num + "' 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +62,8 @@
|
||||
ST_IVT_IOStorInv ios
|
||||
WHERE
|
||||
ios.is_delete = '0'
|
||||
AND
|
||||
ios.io_type = '0'
|
||||
OPTION 输入.bill_code <> ""
|
||||
ios.bill_code like 输入.bill_code
|
||||
ENDOPTION
|
||||
@@ -411,6 +413,8 @@
|
||||
IFNULL(sa2.storagevehicle_code,'') = ''
|
||||
AND
|
||||
sa2.lock_type = '1'
|
||||
AND
|
||||
sa2.is_delete = '0'
|
||||
AND
|
||||
sa.sect_id = 输入.sect_id
|
||||
OPTION 输入.material_code <> ""
|
||||
|
||||
Reference in New Issue
Block a user