|
|
@ -3,6 +3,7 @@ package org.nl.wms.pda.ios_manage.service.impl; |
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
|
import cn.hutool.core.map.MapUtil; |
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
@ -261,8 +262,8 @@ public class PdaIosOutServiceImpl implements PdaIosOutService { |
|
|
|
taskForm.put("point_code1", json.getString("struct_code")); |
|
|
|
taskForm.put("point_code2", whereJson.getString("siteCode")); |
|
|
|
taskForm.put("vehicle_code", json.getString("storagevehicle_code")); |
|
|
|
taskForm.put("is_auto_confirm",(BaseDataEnum.IS_YES_NOT.code("是"))); |
|
|
|
taskForm.put("handle_status",(BaseDataEnum.IS_YES_NOT.code("是"))); |
|
|
|
taskForm.put("is_auto_confirm", (BaseDataEnum.IS_YES_NOT.code("是"))); |
|
|
|
taskForm.put("handle_status", (BaseDataEnum.IS_YES_NOT.code("是"))); |
|
|
|
String taskId = applyTaskMap.get(IOSConstant.ST_OUT_TASK).create(whereJson); |
|
|
|
//更新任务id
|
|
|
|
ioStorInvDisMapper.update(new IOStorInvDis(), new LambdaUpdateWrapper<IOStorInvDis>() |
|
|
@ -502,7 +503,7 @@ public class PdaIosOutServiceImpl implements PdaIosOutService { |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public PdaResponse bindOrUnbind(String siteCode, String shelfCode, String mode) { |
|
|
|
public PdaResponse bindOrUnbind(String siteCode, String shelfCode, String mode, boolean dealGroupPlate) { |
|
|
|
SchBasePoint sitePoint = new SchBasePoint(); |
|
|
|
// 校验站点是否存在、是否可用
|
|
|
|
if (StringUtils.isNotBlank(siteCode)) { |
|
|
@ -543,7 +544,10 @@ public class PdaIosOutServiceImpl implements PdaIosOutService { |
|
|
|
} |
|
|
|
} |
|
|
|
if (IOSEnum.BIND_OR_UNBIND.code("绑定").equals(mode)) { |
|
|
|
checkGroupPlateStatus(shelfCode, sitePoint.getRegion_code()); |
|
|
|
//点位或站点扫码绑定需要处理组盘信息
|
|
|
|
if (dealGroupPlate) { |
|
|
|
dealGroupPlateStatus(shelfCode, sitePoint.getRegion_code()); |
|
|
|
} |
|
|
|
doBind(siteCode, shelfCode); |
|
|
|
} else { |
|
|
|
doUnbind(siteCode, sitePoint.getParent_point_code()); |
|
|
@ -581,13 +585,13 @@ public class PdaIosOutServiceImpl implements PdaIosOutService { |
|
|
|
/** |
|
|
|
* 校验组盘状态 |
|
|
|
*/ |
|
|
|
private void checkGroupPlateStatus(String shelfCode, String regionCode) { |
|
|
|
private void dealGroupPlateStatus(String shelfCode, String regionCode) { |
|
|
|
List<GroupPlate> plates = mdPbGroupplateMapper.selectList( |
|
|
|
new LambdaQueryWrapper<GroupPlate>() |
|
|
|
.eq(GroupPlate::getStoragevehicle_code, shelfCode) |
|
|
|
.lt(GroupPlate::getStatus, GROUP_PLATE_STATUS.code("出库")) |
|
|
|
); |
|
|
|
if (CollectionUtils.isNotEmpty(plates)) { |
|
|
|
if (CollectionUtils.isNotEmpty(plates) && StringUtils.isNotBlank(regionCode)) { |
|
|
|
LambdaUpdateWrapper<GroupPlate> update = new LambdaUpdateWrapper<>(); |
|
|
|
Set<String> plateCodes = plates.stream().map(GroupPlate::getGroup_id).collect(Collectors.toSet()); |
|
|
|
if (!regionCode.equals(StatusEnum.REGION_INFO.code("商用线5号线"))) { |
|
|
@ -650,58 +654,17 @@ public class PdaIosOutServiceImpl implements PdaIosOutService { |
|
|
|
if (ObjectUtil.isEmpty(pointDao)) { |
|
|
|
throw new BadRequestException("未找到载具所在的点位信息,请检查"); |
|
|
|
} |
|
|
|
//预装区与商用5号线点位需自动回空
|
|
|
|
if (pointDao.getRegion_code().equals(StatusEnum.REGION_INFO.code("商用线5号线"))) { |
|
|
|
//物料组盘信息出库
|
|
|
|
//默认整出,强制确认
|
|
|
|
whereJson.put("type", "2"); |
|
|
|
//处理组盘信息
|
|
|
|
handleGroupPlate(whereJson); |
|
|
|
if (StringUtils.isNotBlank(pointDao.getIng_task_code())) { |
|
|
|
SchBaseTask schBaseTask = iSchBaseTaskService.getByCode(pointDao.getIng_task_code()); |
|
|
|
SchBasePoint schBasePoint = iSchBasePointService.getOne(new LambdaQueryWrapper<SchBasePoint>().eq(SchBasePoint::getPoint_code, schBaseTask.getPoint_code1())); |
|
|
|
if (schBasePoint.getRegion_code().equals(StatusEnum.REGION_INFO.code("预装线货架区")) && StringUtils.isNotBlank(whereJson.getString("isAutoReturn"))) { |
|
|
|
String pointCode1 = whereJson.getString("startCode"); |
|
|
|
String pointCode2 = whereJson.getString("siteCode"); |
|
|
|
//自动获取终点回空载具
|
|
|
|
if (BaseDataEnum.IS_YES_NOT.code("是").equals(whereJson.getString("isAutoReturn"))) { |
|
|
|
if (StringUtils.isBlank(pointCode1)) { |
|
|
|
SchBasePoint startPoint = iSchBasePointService.getOne( |
|
|
|
new LambdaQueryWrapper<SchBasePoint>() |
|
|
|
.eq(SchBasePoint::getVehicle_code, whereJson.getString("storagevehicle_code")) |
|
|
|
); |
|
|
|
pointCode1 = startPoint.getPoint_code(); |
|
|
|
} |
|
|
|
List<SchBasePoint> cxPointLists = iSchBasePointService.checkEndPointTask( |
|
|
|
StatusEnum.REGION_INFO.code("预装线货架区"), |
|
|
|
IOSEnum.LOCK_TYPE.code("未锁定"), |
|
|
|
StatusEnum.SORT_TYPE.code("升序"), null, null, "true", false); |
|
|
|
//可放空料架位置
|
|
|
|
cxPointLists = cxPointLists.stream().filter(r -> (StatusEnum.VEHICLE_TYPE.code("空载具").equals(r.getCan_vehicle_type()))).collect(Collectors.toList()); |
|
|
|
if (ObjectUtils.isEmpty(cxPointLists)) { |
|
|
|
throw new BadRequestException("暂无可用放置空架的点位,请稍后再试。"); |
|
|
|
} |
|
|
|
pointCode2 = cxPointLists.get(0).getPoint_code(); |
|
|
|
} |
|
|
|
whereJson.put("pointCode", pointCode1); |
|
|
|
whereJson.put("siteCode", pointCode2); |
|
|
|
//生成任务
|
|
|
|
SpringContextHolder.getBean(PdaIosOutServiceImpl.class).transferConfirm(whereJson); |
|
|
|
} else { |
|
|
|
//线边仓
|
|
|
|
whereJson.put("qty", 1); |
|
|
|
String materialCode = StatusEnum.VEHICLE_TYPE.code("空货架"); |
|
|
|
whereJson.put("material_id", materialCode); |
|
|
|
//组盘
|
|
|
|
pdaIosInServiceImpl.groupPlate(whereJson); |
|
|
|
// 生成空载具入库任务
|
|
|
|
whereJson.put("config_code", IOSConstant.VEHICLE_IN_TASK); |
|
|
|
whereJson.put("storagevehicle_code", whereJson.getString("storagevehicle_code")); |
|
|
|
//入库分配
|
|
|
|
pdaIosInServiceImpl.divStructNoBills(whereJson); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//处理组盘信息
|
|
|
|
handleGroupPlate(whereJson); |
|
|
|
//预装区与商用5号线点位需自动回空
|
|
|
|
if (pointDao.getRegion_code().equals(StatusEnum.REGION_INFO.code("商用线5号线"))) { |
|
|
|
//自动送回空载具
|
|
|
|
autoReturnEmptyVehicle(whereJson, pointDao); |
|
|
|
} else { |
|
|
|
handleGroupPlate(whereJson); |
|
|
|
//载具绑定到出库点
|
|
|
|
iSchBasePointService.update(new SchBasePoint(), new LambdaUpdateWrapper<>(SchBasePoint.class) |
|
|
|
.set(SchBasePoint::getVehicle_code, whereJson.getString("storagevehicle_code")) |
|
|
@ -712,6 +675,59 @@ public class PdaIosOutServiceImpl implements PdaIosOutService { |
|
|
|
return PdaResponse.requestOk(); |
|
|
|
} |
|
|
|
|
|
|
|
private void autoReturnEmptyVehicle(JSONObject whereJson, SchBasePoint pointDao) { |
|
|
|
if (StringUtils.isNotBlank(pointDao.getIng_task_code())) { |
|
|
|
SchBaseTask schBaseTask = iSchBaseTaskService.getByCode(pointDao.getIng_task_code()); |
|
|
|
SchBasePoint schBasePoint = iSchBasePointService.getOne(new LambdaQueryWrapper<SchBasePoint>().eq(SchBasePoint::getPoint_code, schBaseTask.getPoint_code1())); |
|
|
|
if (schBasePoint.getRegion_code().equals(StatusEnum.REGION_INFO.code("预装线货架区")) && StringUtils.isNotBlank(whereJson.getString("isAutoReturn"))) { |
|
|
|
String pointCode1 = whereJson.getString("startCode"); |
|
|
|
String pointCode2 = whereJson.getString("siteCode"); |
|
|
|
//自动获取终点回空载具
|
|
|
|
if (BaseDataEnum.IS_YES_NOT.code("是").equals(whereJson.getString("isAutoReturn"))) { |
|
|
|
if (StringUtils.isBlank(pointCode1)) { |
|
|
|
SchBasePoint startPoint = iSchBasePointService.getOne( |
|
|
|
new LambdaQueryWrapper<SchBasePoint>() |
|
|
|
.eq(SchBasePoint::getVehicle_code, whereJson.getString("storagevehicle_code")) |
|
|
|
); |
|
|
|
pointCode1 = startPoint.getPoint_code(); |
|
|
|
} |
|
|
|
List<SchBasePoint> cxPointLists = iSchBasePointService.checkEndPointTask( |
|
|
|
StatusEnum.REGION_INFO.code("预装线货架区"), |
|
|
|
IOSEnum.LOCK_TYPE.code("未锁定"), |
|
|
|
StatusEnum.SORT_TYPE.code("升序"), null, null, "true", false); |
|
|
|
//可放空料架位置
|
|
|
|
cxPointLists = cxPointLists.stream().filter(r -> (StatusEnum.VEHICLE_TYPE.code("空载具").equals(r.getCan_vehicle_type()))).collect(Collectors.toList()); |
|
|
|
if (ObjectUtils.isEmpty(cxPointLists)) { |
|
|
|
throw new BadRequestException("暂无可用放置空架的点位,请稍后再试。"); |
|
|
|
} |
|
|
|
pointCode2 = cxPointLists.get(0).getPoint_code(); |
|
|
|
} |
|
|
|
whereJson.put("pointCode", pointCode1); |
|
|
|
whereJson.put("siteCode", pointCode2); |
|
|
|
//生成任务
|
|
|
|
SpringContextHolder.getBean(PdaIosOutServiceImpl.class).transferConfirm(whereJson); |
|
|
|
} else { |
|
|
|
//线边仓
|
|
|
|
JSONArray dataArray = new JSONArray(); |
|
|
|
JSONObject item = new JSONObject(); |
|
|
|
String materialCode = StatusEnum.VEHICLE_TYPE.code("空货架"); |
|
|
|
item.put("material_id", materialCode); |
|
|
|
item.put("qty", 1); |
|
|
|
dataArray.add(item); |
|
|
|
whereJson.put("data", dataArray); |
|
|
|
whereJson.put("qty", 1); |
|
|
|
whereJson.put("material_id", materialCode); |
|
|
|
//组盘
|
|
|
|
pdaIosInServiceImpl.groupPlate(whereJson); |
|
|
|
// 生成空载具入库任务
|
|
|
|
whereJson.put("config_code", IOSConstant.VEHICLE_IN_TASK); |
|
|
|
whereJson.put("storagevehicle_code", whereJson.getString("storagevehicle_code")); |
|
|
|
//入库分配
|
|
|
|
pdaIosInServiceImpl.divStructNoBills(whereJson); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void handleGroupPlate(JSONObject whereJson) { |
|
|
|
String currentUserId = SecurityUtils.getCurrentUserId(); |
|
|
@ -756,85 +772,81 @@ public class PdaIosOutServiceImpl implements PdaIosOutService { |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public PdaResponse transferConfirm(JSONObject whereJson) { |
|
|
|
String regionCode = whereJson.getString("region_code"); |
|
|
|
//起点
|
|
|
|
String pointCode1 = whereJson.getString("pointCode"); |
|
|
|
String startPointCode = whereJson.getString("pointCode"); |
|
|
|
//终点
|
|
|
|
String endPointCode; |
|
|
|
//终点
|
|
|
|
String pointCode2 = whereJson.getString("siteCode"); |
|
|
|
//目标点位
|
|
|
|
String regionCode = whereJson.getString("region_code"); |
|
|
|
String vehicleCode = whereJson.getString("storagevehicle_code"); |
|
|
|
if (StringUtils.isBlank(regionCode) && StringUtils.isBlank(pointCode2)) { |
|
|
|
throw new BadRequestException("请选择目标站点或区域!"); |
|
|
|
//校验起点
|
|
|
|
SchBasePoint point = iSchBasePointService.getOne( |
|
|
|
new LambdaQueryWrapper<SchBasePoint>() |
|
|
|
.eq(SchBasePoint::getPoint_code, startPointCode).eq(SchBasePoint::getIs_used, true)); |
|
|
|
if (point == null) { |
|
|
|
throw new BadRequestException("起点点位:" + startPointCode + "不存在,请检查。"); |
|
|
|
} |
|
|
|
//校验载具
|
|
|
|
MdPbStoragevehicleinfo vehicleDao = iMdPbStoragevehicleinfoService.getByCode(vehicleCode); |
|
|
|
if (ObjectUtil.isEmpty(vehicleDao)) { |
|
|
|
throw new BadRequestException("不存在该载具号信息,请检查"); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(pointCode2)) { |
|
|
|
SchBasePoint schBasePoint = iSchBasePointService.getOne( |
|
|
|
if (StringUtils.isBlank(regionCode) && StringUtils.isBlank(pointCode2)) { |
|
|
|
throw new BadRequestException("目标站点或区域请二选一!"); |
|
|
|
} |
|
|
|
//库存校验
|
|
|
|
if (whereJson.getString("isCheckIvt").equals(BaseDataEnum.IS_YES_NOT.code("是"))) { |
|
|
|
SchBasePoint vehiclePoint = iSchBasePointService.getOne( |
|
|
|
new LambdaQueryWrapper<SchBasePoint>() |
|
|
|
.eq(SchBasePoint::getPoint_code, pointCode2).eq(SchBasePoint::getIs_used, true) |
|
|
|
.eq(SchBasePoint::getVehicle_code, vehicleCode) |
|
|
|
); |
|
|
|
if (schBasePoint == null) { |
|
|
|
throw new BadRequestException("输入终点点位有误或被禁用,请检查是否手动输入输错。"); |
|
|
|
} |
|
|
|
} |
|
|
|
// 确定起点
|
|
|
|
String startPointCode; |
|
|
|
SchBasePoint schBasePoint = iSchBasePointService.getOne( |
|
|
|
new LambdaQueryWrapper<SchBasePoint>() |
|
|
|
.eq(SchBasePoint::getVehicle_code, vehicleCode) |
|
|
|
); |
|
|
|
if (StringUtils.isBlank(pointCode1)) { |
|
|
|
if (ObjectUtil.isEmpty(schBasePoint)) { |
|
|
|
throw new BadRequestException("未找到载具所在的点位信息,请检查"); |
|
|
|
} |
|
|
|
startPointCode = schBasePoint.getPoint_code(); |
|
|
|
} else { |
|
|
|
if (ObjectUtil.isEmpty(vehiclePoint)) { |
|
|
|
throw new BadRequestException("该点位不存在物料信息,请检查组盘信息"); |
|
|
|
|
|
|
|
SchBasePoint point = iSchBasePointService.getOne( |
|
|
|
new LambdaQueryWrapper<SchBasePoint>() |
|
|
|
.eq(SchBasePoint::getPoint_code, pointCode1).eq(SchBasePoint::getIs_used, true)); |
|
|
|
if (point == null) { |
|
|
|
throw new BadRequestException("起点点位:" + pointCode1 + "不存在,请检查。"); |
|
|
|
} |
|
|
|
//自动解绑/绑定
|
|
|
|
if (schBasePoint != null) { |
|
|
|
iSchBasePointService.update(new SchBasePoint(), new LambdaUpdateWrapper<>(SchBasePoint.class) |
|
|
|
.set(SchBasePoint::getVehicle_code, null) |
|
|
|
.set(SchBasePoint::getIng_task_code, null) |
|
|
|
.set(SchBasePoint::getPoint_status, IOSEnum.POINT_STATUS.code("无货")) |
|
|
|
.eq(SchBasePoint::getPoint_code, schBasePoint.getPoint_code()) |
|
|
|
); |
|
|
|
} |
|
|
|
iSchBasePointService.update(new SchBasePoint(), new LambdaUpdateWrapper<>(SchBasePoint.class) |
|
|
|
.set(SchBasePoint::getVehicle_code, null) |
|
|
|
.set(SchBasePoint::getIng_task_code, null) |
|
|
|
.set(SchBasePoint::getPoint_status, IOSEnum.POINT_STATUS.code("无货")) |
|
|
|
.eq(SchBasePoint::getPoint_code, vehiclePoint.getPoint_code()) |
|
|
|
); |
|
|
|
iSchBasePointService.update(new SchBasePoint(), new LambdaUpdateWrapper<>(SchBasePoint.class) |
|
|
|
.set(SchBasePoint::getVehicle_code, vehicleCode) |
|
|
|
.set(SchBasePoint::getPoint_status, IOSEnum.POINT_STATUS.code("有货")) |
|
|
|
.eq(SchBasePoint::getPoint_code, pointCode1) |
|
|
|
.eq(SchBasePoint::getPoint_code, startPointCode) |
|
|
|
); |
|
|
|
} |
|
|
|
//终点为站点
|
|
|
|
if (StringUtils.isNotBlank(pointCode2)) { |
|
|
|
SchBasePoint schBasePoint = iSchBasePointService.getOne( |
|
|
|
new LambdaQueryWrapper<SchBasePoint>() |
|
|
|
.eq(SchBasePoint::getPoint_code, pointCode2).eq(SchBasePoint::getIs_used, true) |
|
|
|
); |
|
|
|
startPointCode = pointCode1; |
|
|
|
} |
|
|
|
// 确定终点
|
|
|
|
String endPointCode = pointCode2; |
|
|
|
if (StringUtils.isBlank(endPointCode)) { |
|
|
|
List<SchBasePoint> pointList; |
|
|
|
//特殊分配规则
|
|
|
|
if (regionCode.equals(StatusEnum.REGION_INFO.code("预装线货架区"))) { |
|
|
|
pointList = iSchBasePointService.checkEndPointTask( |
|
|
|
StatusEnum.REGION_INFO.code("预装线货架区"), |
|
|
|
IOSEnum.LOCK_TYPE.code("未锁定"), |
|
|
|
StatusEnum.SORT_TYPE.code("升序"), null, null, "true", false); |
|
|
|
//可放空料架位置
|
|
|
|
pointList = pointList.stream().filter(r -> (StatusEnum.VEHICLE_TYPE.code("空载具").equals(r.getCan_vehicle_type()))).collect(Collectors.toList()); |
|
|
|
if (CollectionUtils.isEmpty(pointList)) { |
|
|
|
//入线边仓
|
|
|
|
whereJson.put("stor_code",StatusEnum.STORE_INFO.code("料架线边库")); |
|
|
|
whereJson.put("sect_code","XB01"); |
|
|
|
if (schBasePoint == null) { |
|
|
|
throw new BadRequestException("输入终点点位有误或被禁用,请检查是否手动输入输错。"); |
|
|
|
} |
|
|
|
endPointCode = pointCode2; |
|
|
|
} else { |
|
|
|
List<SchBasePoint> endPointList = getRegionPoint(regionCode); |
|
|
|
if (CollectionUtils.isEmpty(endPointList)) { |
|
|
|
//入线边仓
|
|
|
|
if (regionCode.equals(StatusEnum.REGION_INFO.code("预装线货架区"))) { |
|
|
|
JSONArray dataArray = new JSONArray(); |
|
|
|
JSONObject item = new JSONObject(); |
|
|
|
item.put("material_id", StatusEnum.VEHICLE_TYPE.code("空货架")); |
|
|
|
item.put("qty", 1); |
|
|
|
dataArray.add(item); |
|
|
|
whereJson.put("data", dataArray); |
|
|
|
whereJson.put("stor_code", StatusEnum.STORE_INFO.code("料架线边库")); |
|
|
|
whereJson.put("sect_code", "XB01"); |
|
|
|
whereJson.put("material_id", StatusEnum.VEHICLE_TYPE.code("空货架")); |
|
|
|
whereJson.put("qty", 1); |
|
|
|
whereJson.put("site_code",startPointCode); |
|
|
|
whereJson.put("vehicle_code",vehicleCode); |
|
|
|
whereJson.put("is_auto_confirm",startPointCode); |
|
|
|
whereJson.put("site_code", startPointCode); |
|
|
|
whereJson.put("vehicle_code", vehicleCode); |
|
|
|
whereJson.put("is_auto_confirm", startPointCode); |
|
|
|
//组盘
|
|
|
|
SpringContextHolder.getBean(PdaIosInServiceImpl.class).groupPlate(whereJson); |
|
|
|
//生成空载具入库任务
|
|
|
@ -842,21 +854,13 @@ public class PdaIosOutServiceImpl implements PdaIosOutService { |
|
|
|
//入库分配
|
|
|
|
SpringContextHolder.getBean(PdaIosInServiceImpl.class).divStructNoBills(whereJson); |
|
|
|
return PdaResponse.requestOk(); |
|
|
|
} |
|
|
|
} else { |
|
|
|
pointList = iSchBasePointService.checkEndPointTask( |
|
|
|
regionCode, |
|
|
|
IOSEnum.LOCK_TYPE.code("未锁定"), |
|
|
|
StatusEnum.SORT_TYPE.code("升序"), |
|
|
|
null, null, "true", false |
|
|
|
); |
|
|
|
if (CollectionUtils.isEmpty(pointList)) { |
|
|
|
} else { |
|
|
|
throw new BadRequestException("暂无可用空位,请稍后再试。"); |
|
|
|
} |
|
|
|
} |
|
|
|
endPointCode = pointList.get(0).getPoint_code(); |
|
|
|
endPointCode = endPointList.get(0).getPoint_code(); |
|
|
|
} |
|
|
|
// 生成转运任务
|
|
|
|
//生成转运任务
|
|
|
|
JSONObject task = new JSONObject(); |
|
|
|
task.put("task_type", IOSConstant.PDA_POINT_TASK); |
|
|
|
task.put("config_code", IOSConstant.PDA_POINT_TASK); |
|
|
@ -874,4 +878,30 @@ public class PdaIosOutServiceImpl implements PdaIosOutService { |
|
|
|
); |
|
|
|
return PdaResponse.requestOk(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* regionCode 区域编号 |
|
|
|
*/ |
|
|
|
private List<SchBasePoint> getRegionPoint(String regionCode) { |
|
|
|
//终点为区域
|
|
|
|
List<SchBasePoint> pointList; |
|
|
|
//特殊分配规则
|
|
|
|
if (regionCode.equals(StatusEnum.REGION_INFO.code("预装线货架区"))) { |
|
|
|
pointList = iSchBasePointService.checkEndPointTask( |
|
|
|
StatusEnum.REGION_INFO.code("预装线货架区"), |
|
|
|
IOSEnum.LOCK_TYPE.code("未锁定"), |
|
|
|
StatusEnum.SORT_TYPE.code("升序"), null, null, "true", false); |
|
|
|
//可放空料架位置
|
|
|
|
pointList = pointList.stream().filter(r -> (StatusEnum.VEHICLE_TYPE.code("空载具").equals(r.getCan_vehicle_type()))).collect(Collectors.toList()); |
|
|
|
} else { |
|
|
|
pointList = iSchBasePointService.checkEndPointTask( |
|
|
|
regionCode, |
|
|
|
IOSEnum.LOCK_TYPE.code("未锁定"), |
|
|
|
StatusEnum.SORT_TYPE.code("降序"), |
|
|
|
null, null, "true", false |
|
|
|
); |
|
|
|
} |
|
|
|
return pointList; |
|
|
|
} |
|
|
|
|
|
|
|
} |