堆叠位置修改
This commit is contained in:
@@ -22,6 +22,7 @@ import org.nl.wms.database.service.dto.VehicleDto;
|
|||||||
import org.nl.wms.ext.acs.service.AcsToWmsService;
|
import org.nl.wms.ext.acs.service.AcsToWmsService;
|
||||||
import org.nl.wms.sch.manage.AreaEnum;
|
import org.nl.wms.sch.manage.AreaEnum;
|
||||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||||
|
import org.nl.wms.sch.manage.VehicleTypeEnum;
|
||||||
import org.nl.wms.sch.manage.buss.*;
|
import org.nl.wms.sch.manage.buss.*;
|
||||||
import org.nl.wms.sch.service.PointService;
|
import org.nl.wms.sch.service.PointService;
|
||||||
import org.nl.wms.sch.service.TaskService;
|
import org.nl.wms.sch.service.TaskService;
|
||||||
@@ -175,44 +176,54 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
case "4":
|
case "4":
|
||||||
//叫空托盘
|
//叫空托盘
|
||||||
jsonObject.put("next_point_code", device_code);
|
jsonObject.put("next_point_code", device_code);
|
||||||
produceInfoByCode = this.getProduceInfoByCode(device_code);
|
//如果是叠盘位3 ,则去铁托盘缓存区取
|
||||||
//假如是码垛位的上料位,则去看看有没有当前排产单生产的物料的半满托
|
if (!StrUtil.equals(device_code,"KTPHCW3")){
|
||||||
if (StrUtil.equals(device_code, "FJJXSXLW201") ||
|
//1 更新缓存位
|
||||||
StrUtil.equals(device_code, "FJJXSXLW202") ||
|
JSONArray pointarr = WQL.getWO("ACSTOMES_001").addParam("area_type", AreaEnum.KTTHCQ.getCode()).addParam("flag", "4").process().getResultJSONArray(0);
|
||||||
StrUtil.equals(device_code, "FJJXSXLW301") ||
|
PointUpdateUtil.updatePoint(pointarr);
|
||||||
StrUtil.equals(device_code, "FJJXSXLW302")
|
jsonObject.put("vehicle_type", VehicleTypeEnum.GTP.getCode() );
|
||||||
) {
|
}else{
|
||||||
JSONObject joo = pointTable.query("point_code='" + device_code + "'").uniqueResult(0);
|
produceInfoByCode = this.getProduceInfoByCode(device_code);
|
||||||
material_id = produceInfoByCode.getString("material_id");
|
//假如是码垛位的上料位,则去看看有没有当前排产单生产的物料的半满托
|
||||||
String workprocedure_id = WorkProcedureEnum.FJGX.getId();
|
if (StrUtil.equals(device_code, "FJJXSXLW201") ||
|
||||||
JSONObject jsonObject1 = WQL.getWO("ACSTOMES_001").addParam("flag", "1")
|
StrUtil.equals(device_code, "FJJXSXLW202") ||
|
||||||
.addParam("workprocedure_id", workprocedure_id)
|
StrUtil.equals(device_code, "FJJXSXLW301") ||
|
||||||
.addParam("material_id", material_id)
|
StrUtil.equals(device_code, "FJJXSXLW302")
|
||||||
.addParam("point_id", joo.getString("point_id"))
|
) {
|
||||||
.process().uniqueResult(0);
|
|
||||||
if (ObjectUtil.isNotEmpty(jsonObject1)) {
|
JSONObject joo = pointTable.query("point_code='" + device_code + "'").uniqueResult(0);
|
||||||
//如果有库存,则出半满托盘
|
material_id = produceInfoByCode.getString("material_id");
|
||||||
//叫料出库
|
String workprocedure_id = WorkProcedureEnum.FJGX.getId();
|
||||||
jsonObject.put("next_point_code", device_code);
|
JSONObject jsonObject1 = WQL.getWO("ACSTOMES_001").addParam("flag", "1")
|
||||||
jsonObject.put("create_mode", "01");
|
.addParam("workprocedure_id", workprocedure_id)
|
||||||
jsonObject.put("material_id", material_id);
|
.addParam("material_id", material_id)
|
||||||
jsonObject.put("is_full", "0");
|
.addParam("point_id", joo.getString("point_id"))
|
||||||
jsonObject.put("workprocedure_id", WorkProcedureEnum.BZGX.getId());
|
.process().uniqueResult(0);
|
||||||
jsonObject.put("group_device", jsonObject1.getString("group_device_id"));
|
if (ObjectUtil.isNotEmpty(jsonObject1)) {
|
||||||
callMaterialTask.createTask((JSONObject) JSON.toJSON(jsonObject));
|
//如果有库存,则出半满托盘
|
||||||
break;
|
//叫料出库
|
||||||
|
jsonObject.put("next_point_code", device_code);
|
||||||
|
jsonObject.put("create_mode", "01");
|
||||||
|
jsonObject.put("material_id", material_id);
|
||||||
|
jsonObject.put("is_full", "0");
|
||||||
|
jsonObject.put("workprocedure_id", WorkProcedureEnum.BZGX.getId());
|
||||||
|
jsonObject.put("group_device", jsonObject1.getString("group_device_id"));
|
||||||
|
callMaterialTask.createTask((JSONObject) JSON.toJSON(jsonObject));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
//需要更新覆膜机的托盘类型
|
||||||
|
JSONArray pointarr = WQL.getWO("ACSTOMES_001").addParam("area_type", "05").addParam("flag", "4").process().getResultJSONArray(0);
|
||||||
|
PointUpdateUtil.updatePoint(pointarr);
|
||||||
}
|
}
|
||||||
//需要更新覆膜机的托盘类型
|
if (ObjectUtil.isEmpty(produceInfoByCode)) {
|
||||||
JSONArray pointarr = WQL.getWO("ACSTOMES_001").addParam("area_type", "05").addParam("flag", "4").process().getResultJSONArray(0);
|
throw new BadRequestException("未找到点位为'" + device_code + "'对应机械手的生产工单!");
|
||||||
|
}
|
||||||
|
jsonObject.put("vehicle_type", produceInfoByCode.getString("vehicle_type"));
|
||||||
|
//需要更新堆叠位的点位状态
|
||||||
|
JSONArray pointarr = WQL.getWO("ACSTOMES_001").addParam("point_code", "KTPDDW5").addParam("flag", "4").process().getResultJSONArray(0);
|
||||||
PointUpdateUtil.updatePoint(pointarr);
|
PointUpdateUtil.updatePoint(pointarr);
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isEmpty(produceInfoByCode)) {
|
|
||||||
throw new BadRequestException("未找到点位为'" + device_code + "'对应机械手的生产工单!");
|
|
||||||
}
|
|
||||||
jsonObject.put("vehicle_type", produceInfoByCode.getString("vehicle_type"));
|
|
||||||
//需要更新堆叠位的点位状态
|
|
||||||
JSONArray pointarr = WQL.getWO("ACSTOMES_001").addParam("point_code", "KTPDDW5").addParam("flag", "4").process().getResultJSONArray(0);
|
|
||||||
PointUpdateUtil.updatePoint(pointarr);
|
|
||||||
callEmptyVehicleTask.createTask((JSONObject) JSON.toJSON(jsonObject));
|
callEmptyVehicleTask.createTask((JSONObject) JSON.toJSON(jsonObject));
|
||||||
break;
|
break;
|
||||||
//生产rgv搬运任务
|
//生产rgv搬运任务
|
||||||
|
|||||||
@@ -219,16 +219,16 @@ public class CallEmptyVehicleTask extends AbstractAcsTask {
|
|||||||
start_area = AreaEnum.MTPQ.getCode();
|
start_area = AreaEnum.MTPQ.getCode();
|
||||||
is_auto_issue = "0";
|
is_auto_issue = "0";
|
||||||
break;
|
break;
|
||||||
|
//叠托盘位置 请求去缓存位置
|
||||||
default:
|
default:
|
||||||
vehicle_type = VehicleTypeEnum.GTP.getCode();
|
vehicle_type = VehicleTypeEnum.GTP.getCode();
|
||||||
start_area = AreaEnum.KTTDDQ.getCode();
|
start_area = AreaEnum.KTTHCQ.getCode();
|
||||||
}
|
}
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
//如果托盘类型不是02,则需要加上托盘类型
|
//如果托盘类型不是02,则需要加上托盘类型
|
||||||
if (!StrUtil.equals(vehicle_type, "02")) {
|
if (!StrUtil.equals(vehicle_type, "02")) {
|
||||||
param.put("vehicle_type", vehicle_type);
|
param.put("vehicle_type", vehicle_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
param.put("area_type", start_area);
|
param.put("area_type", start_area);
|
||||||
JSONObject outStructObj = StructFindUtil.getEmptyVehicleOutStruct(param);
|
JSONObject outStructObj = StructFindUtil.getEmptyVehicleOutStruct(param);
|
||||||
if (ObjectUtil.isEmpty(outStructObj)) {
|
if (ObjectUtil.isEmpty(outStructObj)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user