opt: 手持叫料送料功能
This commit is contained in:
@@ -89,14 +89,42 @@ public class HandheldServiceImpl implements HandheldService {
|
||||
case "3":
|
||||
interiorAisle(vehicle, device_code, param);
|
||||
break;
|
||||
case "4":
|
||||
applyDeliveryRacks(vehicle, device_code, param);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 空载具送回货架
|
||||
*
|
||||
* @param vehicle
|
||||
* @param device_code
|
||||
* @param param
|
||||
*/
|
||||
private void applyDeliveryRacks(String vehicle, String device_code, JSONObject param) {
|
||||
MdBaseVehicle mdBaseVehicle = iMdBaseVehicleService.selectByVehicleCode(vehicle);
|
||||
if (ObjectUtil.isEmpty(mdBaseVehicle)) throw new BadRequestException("载具不存在!");
|
||||
SchBasePoint schBasePoint = iSchBasePointService.selectByPointCode(device_code);
|
||||
if (ObjectUtil.isEmpty(schBasePoint)) throw new BadRequestException("设备点位不存在!");
|
||||
AbstractTask connectorTask = taskFactory.getTask("RACKTask");
|
||||
// 准备参数:设备编码
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_code", device_code);
|
||||
jo.put("config_code", "RACKTask");
|
||||
jo.put("create_mode", GeneralDefinition.AUTO_CREATION);
|
||||
jo.put("vehicle_code", vehicle);
|
||||
jo.put("vehicle_type", mdBaseVehicle.getVehicle_type());
|
||||
jo.put("ext_data", param);
|
||||
connectorTask.apply(jo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 内部过道送托盘
|
||||
*
|
||||
* @param vehicle
|
||||
* @param device_code
|
||||
* @param param
|
||||
|
||||
@@ -396,7 +396,8 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
||||
.eq(SchBasePoint::getIs_lock, false)
|
||||
.eq(SchBasePoint::getIs_used, true)
|
||||
.eq(SchBasePoint::getPoint_status, pointStatus)
|
||||
.eq(SchBasePoint::getPoint_type, "1")
|
||||
.eq(!vehicle_type.equals("G01"),SchBasePoint::getPoint_type, "1")
|
||||
.eq(vehicle_type.equals("G01"),SchBasePoint::getPoint_type, "0")
|
||||
.eq(StrUtil.isNotBlank(vehicle_type), SchBasePoint::getCan_vehicle_type, vehicle_type)
|
||||
.isNull(seq == 2, SchBasePoint::getVehicles)
|
||||
.isNull(seq == 1, SchBasePoint::getVehicle_code)
|
||||
|
||||
@@ -63,7 +63,11 @@ public class RackTask extends AbstractTask {
|
||||
for (SchBaseTask task : tasks) {
|
||||
|
||||
String vehicle_type = task.getVehicle_type();
|
||||
SchBasePoint schBasePoint = schBasePointService.selectByGroundPoint(RegionEnum.ZDZWQ.getRegion_code(),
|
||||
String regionCode = RegionEnum.ZDZWQ.getRegion_code();
|
||||
if(StrUtil.isNotBlank(vehicle_type) && VehicleTypeEnum.TRAY.getVehicleCode().equals(vehicle_type)){
|
||||
regionCode = RegionEnum.LAG_ROBOT_BEANDING_CELL.getRegion_code();
|
||||
}
|
||||
SchBasePoint schBasePoint = schBasePointService.selectByGroundPoint(regionCode,
|
||||
GoodsEnum.OUT_OF_STOCK.getValue(),vehicle_type, 1);
|
||||
if (ObjectUtil.isEmpty(schBasePoint)) {
|
||||
task.setRemark("未找到所需点位!");
|
||||
|
||||
Reference in New Issue
Block a user