fix: demo
This commit is contained in:
@@ -3,11 +3,14 @@ package cn.code.nl.module.wms.manage.dto;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* alleyAve规则
|
||||
* @Author: liyongde
|
||||
* @Date: 2026/7/18 14:12
|
||||
*/
|
||||
@Data
|
||||
public class AlleyAveHandleDTO {
|
||||
private String id;
|
||||
|
||||
/** 仓位编码 */
|
||||
private String structCode;
|
||||
}
|
||||
|
||||
@@ -9,4 +9,6 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class AlleyAveHandleParam {
|
||||
// 载具号
|
||||
private String vehicleCode;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package cn.code.nl.module.wms.manage.handle.base;
|
||||
|
||||
import cn.code.nl.framework.common.exception.ServiceException;
|
||||
import cn.code.nl.module.wms.manage.DecisionManage;
|
||||
import cn.code.nl.module.wms.manage.dto.AlleyAveHandleDTO;
|
||||
import cn.code.nl.module.wms.manage.dto.AlleyAveHandleParam;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -18,6 +20,10 @@ import java.util.List;
|
||||
public class AlleyAveRuleHandler extends DecisionManage<AlleyAveHandleDTO, AlleyAveHandleParam> {
|
||||
@Override
|
||||
public List<AlleyAveHandleDTO> handler(List<AlleyAveHandleDTO> list, AlleyAveHandleParam param) {
|
||||
// 判断仓位是否为空
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
throw new ServiceException(600003, "均衡策略结果:载具号:" + param.getVehicleCode() + "当前分配策略无可用货位");
|
||||
}
|
||||
return List.of();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user