fix:来料入库
This commit is contained in:
@@ -783,7 +783,7 @@ public class InBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv> i
|
|||||||
// 获取组盘信息
|
// 获取组盘信息
|
||||||
GroupPlate groupPlate = mdPbGroupplateService.getOne(new LambdaQueryWrapper<GroupPlate>()
|
GroupPlate groupPlate = mdPbGroupplateService.getOne(new LambdaQueryWrapper<GroupPlate>()
|
||||||
.eq(GroupPlate::getStoragevehicle_code, whereJson.get("vehicle_code"))
|
.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)) {
|
if (ObjectUtil.isEmpty(groupPlate)) {
|
||||||
throw new BadRequestException("托盘[" + whereJson.get("vehicle_code") + "]状态为组盘的信息不存在!");
|
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())) {
|
} else if (StatusEnum.IOBILL_TYPE_IN.code("余料入库").equals(invObj.getBill_type())) {
|
||||||
// 获取组盘信息
|
// 获取组盘信息
|
||||||
GroupPlate groupPlate = mdPbGroupplateService.getOne(new LambdaQueryWrapper<GroupPlate>()
|
GroupPlate groupPlate = mdPbGroupplateService.getOne(new LambdaQueryWrapper<GroupPlate>()
|
||||||
.eq(GroupPlate::getStoragevehicle_code, ioStorInvDis.getStoragevehicle_code())
|
.eq(GroupPlate::getStoragevehicle_code, ioStorInvDis.getStoragevehicle_code()));
|
||||||
.eq(GroupPlate::getStatus, IOSEnum.GROUP_PLATE_STATUS.code("组盘")));
|
|
||||||
|
|
||||||
|
if (ObjectUtil.isEmpty(groupPlate)) {
|
||||||
|
throw new BadRequestException("托盘[" + ioStorInvDis.getStoragevehicle_code() + "]的信息不存在!");
|
||||||
|
}
|
||||||
JSONObject task = new JSONObject();
|
JSONObject task = new JSONObject();
|
||||||
task.put("config_code", IOSConstant.BACK_IN_TASK);
|
task.put("config_code", IOSConstant.BACK_IN_TASK);
|
||||||
task.put("group_id", groupPlate.getGroup_id());
|
task.put("group_id", groupPlate.getGroup_id());
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ public class UpdateIvtUtils {
|
|||||||
}
|
}
|
||||||
// 如果可用数和冻结数都为零则删除数据
|
// 如果可用数和冻结数都为零则删除数据
|
||||||
if (frozen_qty == 0 && extDao.getQty().doubleValue() == 0) {
|
if (frozen_qty == 0 && extDao.getQty().doubleValue() == 0) {
|
||||||
iMdPbStoragevehicleextService.removeById(extDao);
|
iMdPbGroupPlateService.removeById(extDao);
|
||||||
} else {
|
} else {
|
||||||
extDao.setFrozen_qty(BigDecimal.valueOf(frozen_qty));
|
extDao.setFrozen_qty(BigDecimal.valueOf(frozen_qty));
|
||||||
extDao.setUpdate_id(SecurityUtils.getCurrentUserId());
|
extDao.setUpdate_id(SecurityUtils.getCurrentUserId());
|
||||||
|
|||||||
Reference in New Issue
Block a user