no message
This commit is contained in:
@@ -79,6 +79,34 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
jsonObject.put("start_point_code", device_code);
|
||||
jsonObject.put("create_mode", "01");
|
||||
jsonObject.put("group_id", group_id);
|
||||
//假如是半托缓存的几个位置,强制去包装
|
||||
String area_type = pointTable.query("point_code ='" + device_code + "'").uniqueResult(0).getString("area_type");
|
||||
if (StrUtil.equals(area_type, AreaEnum.MTPQ.getCode())) {
|
||||
fmjToPackIngTask.createTask((JSONObject) JSON.toJSON(jsonObject));
|
||||
//生成到包装位的任务时,下发托盘类型给RGV
|
||||
String point_id = pointTable.query("point_code ='" + device_code + "'").uniqueResult(0).getString("point_id");
|
||||
String material_id = structivtTable.query("point_id ='" + point_id + "'").uniqueResult(0).getString("material_id");
|
||||
JSONObject materiralObj1 = WQLObject.getWQLObject("md_me_material").query("material_id = '" + material_id + "'").uniqueResult(0);
|
||||
String vehicle_type = materiralObj1.getString("vehicle_type");
|
||||
if (vehicle_type.equals("03")) {
|
||||
vehicle_type = "1";
|
||||
} else if (vehicle_type.equals("04")) {
|
||||
vehicle_type = "2";
|
||||
} else if (vehicle_type.equals("05")) {
|
||||
vehicle_type = "3";
|
||||
} else if (vehicle_type.equals("06")) {
|
||||
vehicle_type = "4";
|
||||
} else if (vehicle_type.equals("07")) {
|
||||
vehicle_type = "5";
|
||||
}
|
||||
JSONObject jsonObject1 = new JSONObject();
|
||||
JSONArray array = new JSONArray();
|
||||
jsonObject1.put("device_code", "RGV2");
|
||||
jsonObject1.put("code", "to_container_type");
|
||||
jsonObject1.put("value", vehicle_type);
|
||||
array.add(jsonObject1);
|
||||
wmsToAcsServiceImpl.action(array);
|
||||
}
|
||||
if (StrUtil.isEmpty(is_full)) {
|
||||
throw new BadRequestException("托盘是否满托不能为空!");
|
||||
}
|
||||
@@ -87,10 +115,10 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
String material_id = "";
|
||||
JSONObject materialObj = WQLObject.getWQLObject("md_me_material").query("material_code ='" + material_code + "'").uniqueResult(0);
|
||||
if (StrUtil.isEmpty(material_code) && (!StrUtil.equals(device_code, "CYSSX101"))
|
||||
&& !StrUtil.equals(device_code.substring(0,4), "BTHC")) {
|
||||
&& !StrUtil.equals(device_code.substring(0, 4), "BTHC")) {
|
||||
throw new BadRequestException("物料不能为空!");
|
||||
}
|
||||
if (!StrUtil.equals(device_code, "CYSSX101") && !StrUtil.equals(device_code.substring(0,4), "BTHC")) {
|
||||
if (!StrUtil.equals(device_code, "CYSSX101") && !StrUtil.equals(device_code.substring(0, 4), "BTHC")) {
|
||||
material_id = materialObj.getString("material_id");
|
||||
}
|
||||
//如果是出窑输送线 要从组盘表里面去找物料
|
||||
@@ -113,7 +141,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
JSONObject materiralObj = WQLObject.getWQLObject("md_me_material").query("material_id = '" + material_id + "'").uniqueResult(0);
|
||||
Double stewing_time = materiralObj.getDouble("stewing_time");
|
||||
jsonObject.put("stewing_time", stewing_time);
|
||||
String area_type = pointTable.query("point_code ='" + device_code + "'").uniqueResult(0).getString("area_type");
|
||||
//假如是压制下料的几个位置,则要考虑是入输送线 还是入立体库
|
||||
if (StrUtil.equals(area_type, AreaEnum.YZQY.getCode()) && stewing_time <= 0) {
|
||||
//1.首先更新所有输送线的点位状态
|
||||
@@ -164,9 +191,9 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
}
|
||||
JSONObject jsonObject1 = new JSONObject();
|
||||
JSONArray array = new JSONArray();
|
||||
jsonObject1.put("device_code","RGV2");
|
||||
jsonObject1.put("code","to_container_type");
|
||||
jsonObject1.put("value",vehicle_type);
|
||||
jsonObject1.put("device_code", "RGV2");
|
||||
jsonObject1.put("code", "to_container_type");
|
||||
jsonObject1.put("value", vehicle_type);
|
||||
array.add(jsonObject1);
|
||||
try {
|
||||
wmsToAcsServiceImpl.action(array);
|
||||
@@ -175,33 +202,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
}
|
||||
break;
|
||||
}
|
||||
//假如是半托缓存的几个位置,强制去包装
|
||||
if (StrUtil.equals(area_type, AreaEnum.MTPQ.getCode())) {
|
||||
fmjToPackIngTask.createTask((JSONObject) JSON.toJSON(jsonObject));
|
||||
//生成到包装位的任务时,下发托盘类型给RGV
|
||||
String point_id = pointTable.query("point_code ='" + device_code + "'").uniqueResult(0).getString("point_id");
|
||||
material_id = structivtTable.query("point_id ='" + point_id + "'").uniqueResult(0).getString("material_id");
|
||||
JSONObject materiralObj1 = WQLObject.getWQLObject("md_me_material").query("material_id = '" + material_id + "'").uniqueResult(0);
|
||||
String vehicle_type = materiralObj1.getString("vehicle_type");
|
||||
if (vehicle_type.equals("03")) {
|
||||
vehicle_type = "1";
|
||||
} else if (vehicle_type.equals("04")) {
|
||||
vehicle_type = "2";
|
||||
} else if (vehicle_type.equals("05")) {
|
||||
vehicle_type = "3";
|
||||
} else if (vehicle_type.equals("06")) {
|
||||
vehicle_type = "4";
|
||||
} else if (vehicle_type.equals("07")) {
|
||||
vehicle_type = "5";
|
||||
}
|
||||
JSONObject jsonObject1 = new JSONObject();
|
||||
JSONArray array = new JSONArray();
|
||||
jsonObject1.put("device_code","RGV2");
|
||||
jsonObject1.put("code","to_container_type");
|
||||
jsonObject1.put("value",vehicle_type);
|
||||
array.add(jsonObject1);
|
||||
wmsToAcsServiceImpl.action(array);
|
||||
}
|
||||
|
||||
//假如是分拣机械手的下料位置,则需要将点位上的托盘号写入
|
||||
if (StrUtil.equals(area_type, AreaEnum.FJQY.getCode())) {
|
||||
String vehicle_code = pointTable.query("point_code ='" + device_code + "'").uniqueResult(0).getString("vehicle_code");
|
||||
@@ -926,7 +927,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
task_table.delete(taskObj);
|
||||
JSONObject groupObj = group_table.query("task_id ='" + taskObj.getString("task_id") + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(groupObj)) {
|
||||
throw new BadRequestException("找不到task_id为" + taskObj.getString("task_id") +"的盘信息");
|
||||
throw new BadRequestException("找不到task_id为" + taskObj.getString("task_id") + "的盘信息");
|
||||
}
|
||||
group_table.delete(groupObj);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user