修改
This commit is contained in:
@@ -49,6 +49,13 @@ public class CasingController {
|
||||
return new ResponseEntity<>(casingService.outConfirm(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/wearConfirm")
|
||||
@Log("穿轴确认")
|
||||
@ApiOperation("穿轴确认")
|
||||
public ResponseEntity<Object> wearConfirm(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(casingService.wearConfirm(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/queryDeviceByarea")
|
||||
@Log("查询设备")
|
||||
@ApiOperation("查询设备")
|
||||
|
||||
@@ -30,6 +30,14 @@ public interface CasingService {
|
||||
*/
|
||||
JSONObject outConfirm(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 穿轴确认
|
||||
*
|
||||
* @param whereJson /
|
||||
* @return JSONObject
|
||||
*/
|
||||
JSONObject wearConfirm(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 查询设备
|
||||
*
|
||||
|
||||
@@ -186,6 +186,51 @@ public class CasingServiceImpl implements CasingService {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject wearConfirm(JSONObject whereJson) {
|
||||
String qzzno = whereJson.getString("qzzno");
|
||||
String point_code = whereJson.getString("point_code");
|
||||
if (StrUtil.isEmpty(qzzno)) {
|
||||
throw new BadRequestException("气涨轴编码不能为空!");
|
||||
}
|
||||
if (StrUtil.isEmpty(point_code)) {
|
||||
throw new BadRequestException("点位编码不能为空!");
|
||||
}
|
||||
|
||||
JSONObject qzz_jo = WQLObject.getWQLObject("md_pb_storagevehicleinfo").query("storagevehicle_code = '"+qzzno+"' AND is_delete = '0'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(qzz_jo)){
|
||||
throw new BadRequestException("该气涨轴不存在或被删除!");
|
||||
}
|
||||
if (qzz_jo.getString("is_used").equals("0")){
|
||||
throw new BadRequestException("气涨轴未启用!");
|
||||
}
|
||||
String storagevehicle_type = qzz_jo.getString("storagevehicle_type");
|
||||
String to_command = "";
|
||||
if (storagevehicle_type.equals("000101")){
|
||||
to_command = "1";
|
||||
}
|
||||
if (storagevehicle_type.equals("000102")){
|
||||
to_command = "2";
|
||||
}
|
||||
if (StrUtil.isEmpty(to_command)){
|
||||
throw new BadRequestException("未查询到该气涨轴对应的类型!");
|
||||
}
|
||||
|
||||
JSONArray rows = new JSONArray();
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_code",whereJson.getString("point_code"));
|
||||
jo.put("code","to_command");
|
||||
jo.put("value",to_command);
|
||||
rows.add(jo);
|
||||
new WmsToAcsServiceImpl().action(rows);
|
||||
|
||||
|
||||
//下发ACS拔轴机构
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("message", "下发成功!");
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject queryDeviceByarea(JSONObject whereJson) {
|
||||
String product_area = whereJson.getString("product_area");
|
||||
|
||||
@@ -833,7 +833,7 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
||||
String row_num = row_jo.getString("row_num");
|
||||
String placement_type = row_jo.getString("placement_type");
|
||||
|
||||
if (placement_type.equals("01") || placement_type.equals("03")) {
|
||||
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 desc").uniqueResult(0);
|
||||
} else {
|
||||
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);
|
||||
@@ -861,7 +861,7 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
||||
String row_num = empty_row.getString("row_num");
|
||||
String placement_type = empty_row.getString("placement_type");
|
||||
|
||||
if (placement_type.equals("01") || placement_type.equals("03")) {
|
||||
if (placement_type.equals("02")) {
|
||||
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("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);
|
||||
|
||||
Reference in New Issue
Block a user