修改
This commit is contained in:
@@ -25,15 +25,15 @@ public class EmptyVehicleController {
|
|||||||
private final EmptyVehicleService emptyVehicleService;
|
private final EmptyVehicleService emptyVehicleService;
|
||||||
|
|
||||||
@PostMapping("/pointStatusQuery")
|
@PostMapping("/pointStatusQuery")
|
||||||
@Log("分切计划初始化查询")
|
@Log("点位载具查询")
|
||||||
@ApiOperation("分切计划初始化查询")
|
@ApiOperation("点位载具查询")
|
||||||
public ResponseEntity<Object> pointStatusQuery(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> pointStatusQuery(@RequestBody JSONObject whereJson) {
|
||||||
return new ResponseEntity<>(emptyVehicleService.pointStatusQuery(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(emptyVehicleService.pointStatusQuery(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/pointOperate")
|
@PostMapping("/pointOperate")
|
||||||
@Log("子卷出站")
|
@Log("解绑绑定")
|
||||||
@ApiOperation("子卷出站")
|
@ApiOperation("解绑绑定")
|
||||||
public ResponseEntity<Object> pointOperate(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> pointOperate(@RequestBody JSONObject whereJson) {
|
||||||
return new ResponseEntity<>(emptyVehicleService.pointOperate(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(emptyVehicleService.pointOperate(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,11 +25,48 @@ public class EmptyVehicleServiceImpl implements EmptyVehicleService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject pointStatusQuery(JSONObject whereJson) {
|
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
|
@Override
|
||||||
public JSONObject pointOperate(JSONObject whereJson) {
|
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");
|
String placement_type = row_jo.getString("placement_type");
|
||||||
|
|
||||||
if (placement_type.equals("01") || placement_type.equals("03")) {
|
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 {
|
} 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 {
|
} else {
|
||||||
//如果不存在相同订单物料的巷道
|
//如果不存在相同订单物料的巷道
|
||||||
@@ -842,9 +842,9 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
|||||||
String placement_type = empty_row.getString("placement_type");
|
String placement_type = empty_row.getString("placement_type");
|
||||||
|
|
||||||
if (placement_type.equals("01") || placement_type.equals("03")) {
|
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 {
|
} 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 {
|
} 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 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);
|
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")){
|
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")){
|
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
|
ST_IVT_IOStorInv ios
|
||||||
WHERE
|
WHERE
|
||||||
ios.is_delete = '0'
|
ios.is_delete = '0'
|
||||||
|
AND
|
||||||
|
ios.io_type = '0'
|
||||||
OPTION 输入.bill_code <> ""
|
OPTION 输入.bill_code <> ""
|
||||||
ios.bill_code like 输入.bill_code
|
ios.bill_code like 输入.bill_code
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
@@ -411,6 +413,8 @@
|
|||||||
IFNULL(sa2.storagevehicle_code,'') = ''
|
IFNULL(sa2.storagevehicle_code,'') = ''
|
||||||
AND
|
AND
|
||||||
sa2.lock_type = '1'
|
sa2.lock_type = '1'
|
||||||
|
AND
|
||||||
|
sa2.is_delete = '0'
|
||||||
AND
|
AND
|
||||||
sa.sect_id = 输入.sect_id
|
sa.sect_id = 输入.sect_id
|
||||||
OPTION 输入.material_code <> ""
|
OPTION 输入.material_code <> ""
|
||||||
|
|||||||
Reference in New Issue
Block a user