opt:上料/退料点位优化

This commit is contained in:
2025-11-03 10:30:11 +08:00
parent bbebde5e72
commit 513bb696a2
4 changed files with 18 additions and 5 deletions

View File

@@ -512,6 +512,7 @@ public class MesToWmsServiceImpl implements MesToWmsService {
//查询组盘
GroupPlate groupPlate = iMdPbGroupplateService.getOne(new LambdaQueryWrapper<GroupPlate>()
.eq(GroupPlate::getStoragevehicle_code, point.getVehicle_code())
.eq(GroupPlate::getGroup_id, point.getRemark())
.eq(GroupPlate::getStatus, "03"));
if (ObjectUtil.isEmpty(groupPlate)) {
throw new BadRequestException("点位" + point.getPoint_code() + "上的托盘不存在组盘信息!");

View File

@@ -469,9 +469,10 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
public PdaResponse getMaterialSuppByVehicleCode(JSONObject whereJson) {
//查找状态为入库状态的组盘表
List<GroupPlate> groupPlateList = iMdPbGroupPlateService.list(new QueryWrapper<GroupPlate>().lambda()
.eq(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("组盘"))
.eq(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("出库"))
.ne(GroupPlate::getPcsn, "空托盘入库")
.eq(GroupPlate::getStoragevehicle_code, whereJson.getString("vehicle_code"))
.orderByDesc(GroupPlate::getCreate_time)
);
if (CollectionUtils.isEmpty(groupPlateList)) {
@@ -479,10 +480,6 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
}
if (groupPlateList.size() > 1) {
throw new BadRequestException("载具组盘信息重复,请核对!");
}
JSONObject outJson = new JSONObject();
//根据物料id获取物料名称等信息

View File

@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import org.apache.commons.collections4.CollectionUtils;
import org.nl.common.exception.BadRequestException;
@@ -235,11 +236,17 @@ public class DownEmptyUpFullTask extends AbstractTask {
.set(SchBasePoint::getUpdate_time, DateUtil.now())
.set(SchBasePoint::getIng_task_code,null)
.eq(SchBasePoint::getPoint_code, taskObj.getPoint_code1()));
List<GroupPlate> groupPlates = iMdPbGroupplateService.list(new QueryWrapper<GroupPlate>().lambda()
.eq(GroupPlate::getStoragevehicle_code, taskObj.getVehicle_code())
.eq(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("入库")));
//点位3
pointService.update(new LambdaUpdateWrapper<SchBasePoint>()
.set(SchBasePoint::getVehicle_code, taskObj.getVehicle_code())
.set(SchBasePoint::getPoint_status, "3")
.set(SchBasePoint::getVehicle_qty, 1)
.set(CollectionUtils.isNotEmpty(groupPlates),SchBasePoint::getRemark,groupPlates.get(0).getGroup_id())
.set(SchBasePoint::getUpdate_id, SecurityUtils.getCurrentUserId())
.set(SchBasePoint::getUpdate_name, SecurityUtils.getCurrentNickName())
.set(SchBasePoint::getUpdate_time, DateUtil.now())

View File

@@ -3,7 +3,9 @@ package org.nl.wms.sch_manage.service.util.tasks.zw;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import org.apache.commons.collections4.CollectionUtils;
import org.nl.common.exception.BadRequestException;
import org.nl.common.utils.CodeUtil;
import org.nl.common.utils.IdUtil;
@@ -175,11 +177,17 @@ public class SeparateMaterialTask extends AbstractTask {
taskService.updateById(taskObj);
outBillService.taskFinish(taskObj);
List<GroupPlate> groupPlates = iMdPbGroupplateService.list(new QueryWrapper<GroupPlate>().lambda()
.eq(GroupPlate::getStoragevehicle_code, taskObj.getVehicle_code())
.eq(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("入库")));
//更改点位的托盘信息,空托盘的点位 2为空托盘放置点位
pointService.update(new LambdaUpdateWrapper<SchBasePoint>()
.set(SchBasePoint::getVehicle_code, taskObj.getVehicle_code())
.set(SchBasePoint::getPoint_status, "3")
.set(SchBasePoint::getVehicle_qty, 1)
.set(CollectionUtils.isNotEmpty(groupPlates),SchBasePoint::getRemark,groupPlates.get(0).getGroup_id())
.set(SchBasePoint::getUpdate_id, SecurityUtils.getCurrentUserId())
.set(SchBasePoint::getUpdate_name, SecurityUtils.getCurrentNickName())
.set(SchBasePoint::getUpdate_time, DateUtil.now())