fix: demo

This commit is contained in:
2026-07-20 15:09:58 +08:00
parent 503d8c9e82
commit 11bada2873
3 changed files with 12 additions and 1 deletions

View File

@@ -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;
}

View File

@@ -9,4 +9,6 @@ import lombok.Data;
*/
@Data
public class AlleyAveHandleParam {
// 载具号
private String vehicleCode;
}

View File

@@ -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();
}
}