opt:健壮性优化
This commit is contained in:
@@ -86,7 +86,8 @@ public class MesToWmsServiceImpl implements MesToWmsService {
|
||||
if (groupList.isEmpty()){
|
||||
throw new BadRequestException("叫满任务失败,库存没有当前下料口的组盘物料");
|
||||
}
|
||||
String storagevehicleCode = groupList.get(0).getStoragevehicle_code();
|
||||
GroupPlate groupPlate = groupList.get(0);
|
||||
String storagevehicleCode = groupPlate.getStoragevehicle_code();
|
||||
//根据托盘获取当前起点
|
||||
SchBasePoint start_point = iSchBasePointService.getOne(new LambdaQueryWrapper<SchBasePoint>()
|
||||
.eq(SchBasePoint::getVehicle_code, storagevehicleCode));
|
||||
@@ -116,7 +117,7 @@ public class MesToWmsServiceImpl implements MesToWmsService {
|
||||
// 创建第一个entry对象
|
||||
JSONObject entry = new JSONObject();
|
||||
for (WorkOrderBomDao orderBomItem : orderBomItems) {
|
||||
entry.put("qty", groupList.get(0).getQty());
|
||||
entry.put("qty", groupPlate.getQty());
|
||||
entry.put("sourceBillId", workOrder.getOrder_id());
|
||||
entry.put("sourceBillEntryId", orderBomItem.getItem_id());
|
||||
entry.put("sourceBillNo", workOrder.getOrder_code());
|
||||
|
||||
@@ -422,6 +422,9 @@ public class InboundPdaServiceImpl implements InboundPdaService {
|
||||
.reduce(Double::sum).orElse(0.0);
|
||||
// 查询库位
|
||||
Structattr struct = iStructattrService.findByCode(dto.getStruct_code());
|
||||
if (struct == null){
|
||||
throw new BadRequestException("入库失败:库位" + dto.getStruct_code() + "不存在");
|
||||
}
|
||||
// 查询库区
|
||||
Sectattr sectDao = iSectattrService.findByCode(struct.getSect_code());
|
||||
// 组织主表数据
|
||||
|
||||
Reference in New Issue
Block a user