diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/enums/VehicleEnum.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/enums/VehicleEnum.java new file mode 100644 index 0000000..efc3b6b --- /dev/null +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/enums/VehicleEnum.java @@ -0,0 +1,47 @@ +/* + * Copyright 2019-2020 Zheng Jie + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.nl.common.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * 载具美剧 + */ +@Getter +@AllArgsConstructor +public enum VehicleEnum { + + /* 旧邮箱修改邮箱 */ + S("1", "小"), + /* 通过邮箱修改密码 */ + M("2", "中"), + L("3", "大"), + XL("4", "更大"); + + private final String code; + private final String description; + + public static VehicleEnum find(Integer code) { + for (VehicleEnum value : VehicleEnum.values()) { + if (code.equals(value.getCode())) { + return value; + } + } + return null; + } + +} diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/enums/region/RegionEnum.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/enums/region/RegionEnum.java index 98f36b1..177733f 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/enums/region/RegionEnum.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/enums/region/RegionEnum.java @@ -8,8 +8,9 @@ import lombok.Getter; public enum RegionEnum { STAMPING_AND_BLANKING("Amada 80T冲床(手动加工)","111-06"), - TRUBEND_SHELVES_3_1_1("TruBend 7036货架03-01-01","111-07"); - + TRUBEND_SHELVES_3_1_1("TruBend 7036货架03-01-01","111-07"), + ZDFJ("分拣工序","111-08"), + ; private final String region_name; private final String region_code; diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/ISchBasePointService.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/ISchBasePointService.java index 5669611..a0f8564 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/ISchBasePointService.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/ISchBasePointService.java @@ -81,10 +81,11 @@ public interface ISchBasePointService extends IService { SchBasePoint selectByRegionCode(String region_code,String vehicleCode); /** - * 根据工序查询区域空点位 - * @param region_code + * 根据工序查询区域空载具 + * 没有点位则返回null + * @param region_code,vehicleType托盘类型允许多种类型 */ - SchBasePoint selectEmpPointByRegionCode(String region_code,String vehicleCode); + SchBasePoint selectEmpVehicleByRegionCode(String region_code, String...vehicleType); /** diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/SchBasePoint.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/SchBasePoint.java index 3e736df..aecc6a5 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/SchBasePoint.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/SchBasePoint.java @@ -40,7 +40,7 @@ public class SchBasePoint implements Serializable { @ApiModelProperty(value = "点位类型") private String point_type; - @ApiModelProperty(value = "点位状态") + @ApiModelProperty(value = "点位状态0无货1空托盘2有料") private String point_status; @ApiModelProperty(value = "允许的物料类型") diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dto/PointMaterialInfo.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dto/PointMaterialInfo.java new file mode 100644 index 0000000..01e9802 --- /dev/null +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dto/PointMaterialInfo.java @@ -0,0 +1,39 @@ +package org.nl.wms.sch.point.service.dto; + +import com.baomidou.mybatisplus.annotation.TableField; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.nl.wms.sch.point.service.dao.SchBasePoint; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** +* @description / +* @author lyd +* @date 2023-05-15 +**/ +@Data +public class PointMaterialInfo extends SchBasePoint { + private static final long serialVersionUID = 1L; + @ApiModelProperty(value = "组盘标识") + private String group_id; + + @ApiModelProperty(value = "物料标识") + private String material_id; + + @ApiModelProperty(value = "批次") + private String pcsn; + + @ApiModelProperty(value = "物料数量") + private Integer material_qty; + + @ApiModelProperty(value = "物料重量") + private BigDecimal material_weight; + + @ApiModelProperty(value = "额外信息") + private String ext_data; + + private String region_name; + +} diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java index 0aa3491..d6e8634 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java @@ -30,6 +30,9 @@ import org.nl.wms.sch.task_manage.enums.PointStatusEnum; import org.nl.wms.util.PointUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; import java.util.Arrays; import java.util.List; @@ -319,7 +322,24 @@ public class SchBasePointServiceImpl extends ServiceImpl schBasePoints = pointMapper.selectList(Wrappers.lambdaQuery(SchBasePoint.class).eq(SchBasePoint::getIs_lock, false). + isNotNull(SchBasePoint::getVehicle_code) + .eq(SchBasePoint::getRegion_code, region_code) + .eq(SchBasePoint::getPoint_status,GoodsEnum.EMPTY_PALLETS.getValue()) + .in(SchBasePoint::getVehicle_type, vehicleType) + .eq(SchBasePoint::getIs_used, true)); + if(CollectionUtils.isEmpty(schBasePoints)) { + return null; + } + SchBasePoint schBasePoint = schBasePoints.get(0); + this.update(new UpdateWrapper() + .set("is_lock",true) + .eq("point_code",schBasePoint.getPoint_code())); + return schBasePoint; + } } }