fix:来料入库

This commit is contained in:
zhengxuming
2025-08-12 16:01:15 +08:00
parent 1ae2d97db4
commit 2e87d667c6
2 changed files with 6 additions and 4 deletions

View File

@@ -783,7 +783,7 @@ public class InBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv> i
// 获取组盘信息
GroupPlate groupPlate = mdPbGroupplateService.getOne(new LambdaQueryWrapper<GroupPlate>()
.eq(GroupPlate::getStoragevehicle_code, whereJson.get("vehicle_code"))
.eq(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("组盘")));
.eq(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("入库")));
if (ObjectUtil.isEmpty(groupPlate)) {
throw new BadRequestException("托盘[" + whereJson.get("vehicle_code") + "]状态为组盘的信息不存在!");
}
@@ -808,9 +808,11 @@ public class InBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv> i
} else if (StatusEnum.IOBILL_TYPE_IN.code("余料入库").equals(invObj.getBill_type())) {
// 获取组盘信息
GroupPlate groupPlate = mdPbGroupplateService.getOne(new LambdaQueryWrapper<GroupPlate>()
.eq(GroupPlate::getStoragevehicle_code, ioStorInvDis.getStoragevehicle_code())
.eq(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("组盘")));
.eq(GroupPlate::getStoragevehicle_code, ioStorInvDis.getStoragevehicle_code()));
if (ObjectUtil.isEmpty(groupPlate)) {
throw new BadRequestException("托盘[" + ioStorInvDis.getStoragevehicle_code() + "]的信息不存在!");
}
JSONObject task = new JSONObject();
task.put("config_code", IOSConstant.BACK_IN_TASK);
task.put("group_id", groupPlate.getGroup_id());

View File

@@ -197,7 +197,7 @@ public class UpdateIvtUtils {
}
// 如果可用数和冻结数都为零则删除数据
if (frozen_qty == 0 && extDao.getQty().doubleValue() == 0) {
iMdPbStoragevehicleextService.removeById(extDao);
iMdPbGroupPlateService.removeById(extDao);
} else {
extDao.setFrozen_qty(BigDecimal.valueOf(frozen_qty));
extDao.setUpdate_id(SecurityUtils.getCurrentUserId());