diff --git a/shkj-wms/src/main/java/com/shkj/wms/bo/BaseLocationRemoveBo.java b/shkj-wms/src/main/java/com/shkj/wms/bo/BaseLocationRemoveBo.java new file mode 100644 index 0000000..b941fa3 --- /dev/null +++ b/shkj-wms/src/main/java/com/shkj/wms/bo/BaseLocationRemoveBo.java @@ -0,0 +1,32 @@ +package com.shkj.wms.bo; + +import com.shkj.common.core.domain.BaseEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import javax.validation.constraints.NotEmpty; +import java.util.List; + + +/** + * 更新货位状态实体类 + * + * @author lch + * @date 2022-04-23 + */ +@Data +public class BaseLocationRemoveBo{ + + /** + * 货位Id集合 + */ + @NotEmpty(message = "货位ID集合不得为空") + private List ids; + /** + * 状态 true:删除 false:正常 + */ + @NotEmpty(message = "状态不得为空") + private Boolean status; + + +} diff --git a/shkj-wms/src/main/java/com/shkj/wms/constants/ParameterConstants.java b/shkj-wms/src/main/java/com/shkj/wms/constants/ParameterConstants.java index c3d0f34..f5adeb5 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/constants/ParameterConstants.java +++ b/shkj-wms/src/main/java/com/shkj/wms/constants/ParameterConstants.java @@ -121,6 +121,8 @@ public final class ParameterConstants { public final static String waitTaskNumber="wait_task_number"; + //异常条码保险杠出库 + public final static String abnormal_out_point="abnormal_out_point"; } diff --git a/shkj-wms/src/main/java/com/shkj/wms/controller/base/BaseLocationController.java b/shkj-wms/src/main/java/com/shkj/wms/controller/base/BaseLocationController.java index c5ece67..10f1ec8 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/controller/base/BaseLocationController.java +++ b/shkj-wms/src/main/java/com/shkj/wms/controller/base/BaseLocationController.java @@ -85,6 +85,18 @@ public class BaseLocationController extends BaseController { } + /** + * 禁用启用货位 + */ + @PostMapping("/enableDisableLocation") + public Result enableDisableLocation(@Valid @RequestBody BaseLocationRemoveBo bo) { + return iBaseLocationService.deleteWithValidById(bo.getIds(), bo.getStatus()); + } + + + + + /** * 切换状态 */ diff --git a/shkj-wms/src/main/java/com/shkj/wms/service/impl/BaseLocationServiceImpl.java b/shkj-wms/src/main/java/com/shkj/wms/service/impl/BaseLocationServiceImpl.java index 1118c75..a0348c4 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/service/impl/BaseLocationServiceImpl.java +++ b/shkj-wms/src/main/java/com/shkj/wms/service/impl/BaseLocationServiceImpl.java @@ -160,7 +160,11 @@ public class BaseLocationServiceImpl extends ServiceImpl deleteWithValidById(List ids, Boolean isValid) { BaseLocation del = new BaseLocation(); - del.setIsDel(IsDelEnum.DELETED.getValue()); + if (isValid == true) { + del.setIsDel(IsDelEnum.DELETED.getValue()); + } else { + del.setIsDel(IsDelEnum.NORMAL.getValue()); + } LambdaQueryWrapper wrapper = new LambdaQueryWrapper().in(BaseLocation::getId, ids) .eq(BaseLocation::getBranchId, SecurityUtils.getCurrentBranchId()); this.update(del, wrapper); diff --git a/shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinDataTaskServiceImpl.java b/shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinDataTaskServiceImpl.java index 7f9b6a2..76659a7 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinDataTaskServiceImpl.java +++ b/shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinDataTaskServiceImpl.java @@ -522,6 +522,7 @@ public class BusinDataTaskServiceImpl extends ServiceImpl sysStockDetailVoList =null; + //检查货位是否是双深位 Result booleanResult = checkIsSleep(baseLocationVo); if (!Result.isOk(booleanResult)){ return booleanResult; @@ -540,7 +541,20 @@ public class BusinDataTaskServiceImpl extends ServiceImpl pointList = iBasePointService.list(new LambdaQueryWrapper() + .in(BasePoint::getPointNo, toPoints) + .eq(BasePoint::getIsOccupy,"0") + ); + String taskPath=""; + if (pointList !=null && pointList.size()>0){ + taskPath=pointList.get(0).getPointNo(); + } + if (StringUtils.isEmpty(taskPath)){ + return Result.err().msg("搬运码头无空闲,不可出库"); + } //生成作业任务 int index=0;