1. 修复库位调度的输入, 105和107尺寸对调
2. 适配库位使用率接口, 交换1库和3库 3. 出库接口添加返回值, 返回出库终点
This commit is contained in:
parent
49a741ae40
commit
9fe2145428
|
|
@ -6,9 +6,9 @@ import lombok.Getter;
|
|||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WmsLocationNumEnums {
|
||||
LOCATION_NUM_1(525, "1号库"),
|
||||
LOCATION_NUM_1(540, "1号库"),
|
||||
LOCATION_NUM_2(316, "2号库"),
|
||||
LOCATION_NUM_3(540, "3号库");
|
||||
LOCATION_NUM_3(525, "3号库");
|
||||
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public class WcsControllerServiceImpl implements IWcsControllerService {
|
|||
// 一号堆垛机,全部存空托盘
|
||||
if(point.equals("105") || point.equals("106") || point.equals("107")) {
|
||||
// 选一个库位
|
||||
TAppLocation targetLocation = stackerTaskService.getEmptyLocation(1, point.equals("107") ? WmsLocationTypeEnums.TYPE_600 : WmsLocationTypeEnums.TYPE_500);
|
||||
TAppLocation targetLocation = stackerTaskService.getEmptyLocation(1, point.equals("105") ? WmsLocationTypeEnums.TYPE_600 : WmsLocationTypeEnums.TYPE_500);
|
||||
if(targetLocation == null) {
|
||||
return WcsApiResponse.error("没有空闲库位,请稍后再试", null);
|
||||
}
|
||||
|
|
@ -76,7 +76,7 @@ public class WcsControllerServiceImpl implements IWcsControllerService {
|
|||
orderIn.setBatch("0");
|
||||
orderIn.setGoodsType("0");
|
||||
orderIn.setSpecification("empty");
|
||||
orderIn.setQuantity(1.0);
|
||||
orderIn.setQuantity(4.0);
|
||||
orderIn.setGoodsDesc("");
|
||||
orderIn.setXsfbillno("");
|
||||
orderIn.setXsfseq(0);
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ public class YcwmsControllerServiceImpl implements IYcwmsControllerService {
|
|||
if(!appOrderOutService.save(orderOut)) {
|
||||
return YcwmsResponse.error("出库单保存失败,请稍后再试", null);
|
||||
}
|
||||
return YcwmsResponse.success();
|
||||
return YcwmsResponse.success(getLocByGoodsId(request.getGoodsId()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -224,7 +224,7 @@ public class YcwmsControllerServiceImpl implements IYcwmsControllerService {
|
|||
if (equipmentId == null || equipmentId.isEmpty()) {
|
||||
return YcwmsResponse.error("参数错误", null);
|
||||
}
|
||||
if (equipmentId.equals("1")) {
|
||||
if (equipmentId.equals("3")) {
|
||||
Integer queryId = Integer.parseInt(equipmentId);
|
||||
Long locationNum500 = appLocationService.count(
|
||||
new LambdaQueryWrapper<TAppLocation>()
|
||||
|
|
@ -239,7 +239,7 @@ public class YcwmsControllerServiceImpl implements IYcwmsControllerService {
|
|||
.eq(TAppLocation::getIsOccupy, WmsLocationOccupyStatusEnums.OCCUPY.getCode())
|
||||
);
|
||||
Long locationNum = locationNum500 + locationNum600;
|
||||
Double percent = Double.parseDouble(locationNum.toString()) / WmsLocationNumEnums.LOCATION_NUM_1.getCode();
|
||||
Double percent = Double.parseDouble(locationNum.toString()) / WmsLocationNumEnums.LOCATION_NUM_3.getCode();
|
||||
return YcwmsResponse.success(percent);
|
||||
} else if (equipmentId.equals("2")) {
|
||||
Integer queryId = Integer.parseInt(equipmentId);
|
||||
|
|
@ -251,7 +251,7 @@ public class YcwmsControllerServiceImpl implements IYcwmsControllerService {
|
|||
);
|
||||
Double percent = Double.parseDouble(locationNum.toString()) / WmsLocationNumEnums.LOCATION_NUM_2.getCode();
|
||||
return YcwmsResponse.success(percent);
|
||||
} else if (equipmentId.equals("3")) {
|
||||
} else if (equipmentId.equals("1")) {
|
||||
Integer queryId = Integer.parseInt(equipmentId);
|
||||
Long locationNum = appLocationService.count(
|
||||
new LambdaQueryWrapper<TAppLocation>()
|
||||
|
|
@ -259,9 +259,28 @@ public class YcwmsControllerServiceImpl implements IYcwmsControllerService {
|
|||
.eq(TAppLocation::getLocationType, WmsLocationTypeEnums.TYPE_PRODUCT.getCode())
|
||||
.eq(TAppLocation::getIsOccupy, WmsLocationOccupyStatusEnums.OCCUPY.getCode())
|
||||
);
|
||||
Double percent = Double.parseDouble(locationNum.toString()) / WmsLocationNumEnums.LOCATION_NUM_3.getCode();
|
||||
Double percent = Double.parseDouble(locationNum.toString()) / WmsLocationNumEnums.LOCATION_NUM_1.getCode();
|
||||
return YcwmsResponse.success(percent);
|
||||
}
|
||||
return YcwmsResponse.error("equipmentId无效", null);
|
||||
}
|
||||
|
||||
private String getLocByGoodsId(String goodsId) {
|
||||
if (goodsId.length() < 3) {
|
||||
return switch (goodsId) {
|
||||
case "0" -> "LK-3";
|
||||
case "1" -> "LK-4";
|
||||
case "2" -> "LK-5";
|
||||
case "3" -> "LK-6";
|
||||
case "4" -> "LK-7";
|
||||
default -> "";
|
||||
};
|
||||
} else {
|
||||
List<TAppStock> stocks = appStockService.list(
|
||||
new LambdaQueryWrapper<TAppStock>()
|
||||
.eq(TAppStock::getVehicleId, goodsId)
|
||||
);
|
||||
return ConvertUtils.convertDestinationToPoint(stocks.getFirst().getBarCode());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user