diff --git a/src/main/java/com/gaotao/modules/automatedWarehouse/entity/PalletDetailData.java b/src/main/java/com/gaotao/modules/automatedWarehouse/entity/PalletDetailData.java index a2e4705..ad71016 100644 --- a/src/main/java/com/gaotao/modules/automatedWarehouse/entity/PalletDetailData.java +++ b/src/main/java/com/gaotao/modules/automatedWarehouse/entity/PalletDetailData.java @@ -1,9 +1,12 @@ package com.gaotao.modules.automatedWarehouse.entity; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import org.apache.ibatis.type.Alias; +import org.springframework.format.annotation.DateTimeFormat; import java.math.BigDecimal; +import java.util.Date; @Data @Alias("PalletDetailData") @@ -25,7 +28,9 @@ public class PalletDetailData extends PalletDetail{ private String manufactureDateStr; private BigDecimal realHeight; private String reserveFlag; - + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date receiveDate; /** * 预约单据参考3(工单号)- rqrq */ diff --git a/src/main/java/com/gaotao/modules/automatedWarehouse/mapper/WcsIntegrationMapper.java b/src/main/java/com/gaotao/modules/automatedWarehouse/mapper/WcsIntegrationMapper.java index 55dd921..0cb0bed 100644 --- a/src/main/java/com/gaotao/modules/automatedWarehouse/mapper/WcsIntegrationMapper.java +++ b/src/main/java/com/gaotao/modules/automatedWarehouse/mapper/WcsIntegrationMapper.java @@ -3,6 +3,7 @@ package com.gaotao.modules.automatedWarehouse.mapper; import com.gaotao.modules.api.entity.TaskNote; import com.gaotao.modules.automatedWarehouse.entity.*; import com.gaotao.modules.base.entity.PalletType; +import com.gaotao.modules.handlingunit.entity.HandlingUnit; import com.gaotao.modules.warehouse.entity.Pallet; import com.gaotao.modules.warehouse.entity.PalletData; import org.apache.ibatis.annotations.Mapper; @@ -48,6 +49,10 @@ public interface WcsIntegrationMapper { */ List> getPalletDetails(@Param("site") String site, @Param("palletId") String palletId, @Param("position") String position, @Param("layer") Integer layer); + List getPalletDetailsPosition(@Param("site") String site, + @Param("palletId") String palletId,@Param("position") String position); + HandlingUnit getExpiredDateWithSerialNo(@Param("site") String site, + @Param("serialNo") String serialNo); List getPalletDetailsData(@Param("site") String site, @Param("palletId") String palletId); /** diff --git a/src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/WcsIntegrationServiceImpl.java b/src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/WcsIntegrationServiceImpl.java index 26465fd..6f3b1bf 100644 --- a/src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/WcsIntegrationServiceImpl.java +++ b/src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/WcsIntegrationServiceImpl.java @@ -573,7 +573,6 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { !StringUtils.hasText(position) || layer == null || !StringUtils.hasText(serialNo)) { throw new Exception("参数不能为空"); } - Map palletData = wcsIntegrationMapper.getPalletInfo(site, palletId); // 检查栈板是否正在被调用 - rqrq com.gaotao.modules.warehouse.entity.Pallet pallet = wcsIntegrationMapper.getPalletByCode(site, palletId); if (pallet != null && "Y".equals(pallet.getCallingFlag())) { @@ -668,6 +667,7 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { String palletType = palletInfo.getPalletType(); Integer maxLayer = palletInfo.getMaxLayer() != null ? palletInfo.getMaxLayer() : 0; Integer wcsSoreType = palletInfo.getWcsSoreType() != null ? palletInfo.getWcsSoreType() : 0; + Integer wcsBasePalletType = palletInfo.getWcsBasePalletType() != null ? palletInfo.getWcsBasePalletType() : 0; if (layer > 1) { // 检查该位置的第1层到第layer-1层是否都有物料 - rqrq List existingLayers = wcsIntegrationMapper.getLayersByPosition(site, palletId, position); @@ -686,6 +686,17 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { if (!existingDetails.isEmpty()) { throw new Exception("该位置第" + layer + "层已有物料,气胀轴分拣托盘每层只能放一个物料"); } + // if(wcsBasePalletType==2){ + // //围框自动分拣,必须满足同一摞物料的接收日期要同一天 并且是同一个物料 + // List existingDetailsOther = wcsIntegrationMapper.getPalletDetailsPosition(site, palletId, position); + // if (!existingDetailsOther.isEmpty()) { + // PalletDetailData getFirst = existingDetailsOther.getFirst(); + // HandlingUnit handlingUnit = wcsIntegrationMapper.getExpiredDateWithSerialNo(site,serialNo); + // if(!getFirst.getPartNo().equals(partNo)){ + // throw new Exception("该位置第" + layer + "层已有物料,请勿重复扫描"); + // } + // } + // } } else if (wcsSoreType == 2) { // wcsSoreType = 2:抱箱自动分拣(底4箱+上3箱等),每层可以放多个东西 } else { diff --git a/src/main/resources/mapper/automatedWarehouse/WcsIntegrationMapper.xml b/src/main/resources/mapper/automatedWarehouse/WcsIntegrationMapper.xml index 075aa42..bd2829b 100644 --- a/src/main/resources/mapper/automatedWarehouse/WcsIntegrationMapper.xml +++ b/src/main/resources/mapper/automatedWarehouse/WcsIntegrationMapper.xml @@ -183,6 +183,23 @@ ORDER BY a.position, a.layer, a.serial_no + + + +