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