no message

This commit is contained in:
18188916393
2022-11-06 17:11:29 +08:00
parent c5667cc29e
commit 9bdd25b591

View File

@@ -79,6 +79,34 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
jsonObject.put("start_point_code", device_code); jsonObject.put("start_point_code", device_code);
jsonObject.put("create_mode", "01"); jsonObject.put("create_mode", "01");
jsonObject.put("group_id", group_id); 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)) { if (StrUtil.isEmpty(is_full)) {
throw new BadRequestException("托盘是否满托不能为空!"); throw new BadRequestException("托盘是否满托不能为空!");
} }
@@ -113,7 +141,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
JSONObject materiralObj = WQLObject.getWQLObject("md_me_material").query("material_id = '" + material_id + "'").uniqueResult(0); JSONObject materiralObj = WQLObject.getWQLObject("md_me_material").query("material_id = '" + material_id + "'").uniqueResult(0);
Double stewing_time = materiralObj.getDouble("stewing_time"); Double stewing_time = materiralObj.getDouble("stewing_time");
jsonObject.put("stewing_time", 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) { if (StrUtil.equals(area_type, AreaEnum.YZQY.getCode()) && stewing_time <= 0) {
//1.首先更新所有输送线的点位状态 //1.首先更新所有输送线的点位状态
@@ -175,33 +202,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
} }
break; 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())) { if (StrUtil.equals(area_type, AreaEnum.FJQY.getCode())) {
String vehicle_code = pointTable.query("point_code ='" + device_code + "'").uniqueResult(0).getString("vehicle_code"); String vehicle_code = pointTable.query("point_code ='" + device_code + "'").uniqueResult(0).getString("vehicle_code");