|
@@ -17,6 +17,7 @@ import com.ruoyi.common.utils.StringUtils;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.data.redis.core.KeyBoundCursor;
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -273,6 +274,40 @@ public class BaseLocationInfoServiceImpl implements IBaseLocationInfoService {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ //验证同列物料是否为相同的
|
|
|
+ @Override
|
|
|
+ public Boolean verifyThatTheItemsAreIdentical(String locationId, Long warehouseId) {
|
|
|
+ //推荐的库位
|
|
|
+ BaseLocationInfo baseLocationInfo = selectBaseLocationInfoByIdOrNo(locationId, warehouseId);
|
|
|
+ //根据推荐的库位查询出同列的库位
|
|
|
+ List<BaseLocationInfo> baseLocationInfos1 = baseLocationInfoMapper.selectBaseLocationInfoList2(baseLocationInfo);
|
|
|
+ Long id =new Long(0);
|
|
|
+ Long id1 = new Long(0);
|
|
|
+ if (baseLocationInfos1.size() == 0){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (baseLocationInfos1.size()<2){
|
|
|
+ id = baseLocationInfos1.get(0).getId();
|
|
|
+ }else {
|
|
|
+ id = baseLocationInfos1.get(0).getId();
|
|
|
+ id1 = baseLocationInfos1.get(1).getId();
|
|
|
+ }
|
|
|
+ BaseLocationInfo baseLocationInfo1 = selectBaseLocationInfoByIdOrNo(id.toString(), warehouseId);
|
|
|
+ BaseLocationInfo baseLocationInfo2 = selectBaseLocationInfoByIdOrNo(id1.toString(), warehouseId);
|
|
|
+ List<BaseLocationInfo> baseLocationInfos = baseLocationInfoMapper.selectBaseLocationInfoList1(baseLocationInfo1);
|
|
|
+ List<BaseLocationInfo> baseLocationInfos2 = baseLocationInfoMapper.selectBaseLocationInfoList1(baseLocationInfo2);
|
|
|
+ if (baseLocationInfos1.size()<2){
|
|
|
+ if (baseLocationInfos.size()>0 ){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ if (baseLocationInfos.size()>0 || baseLocationInfos2.size()>0){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public Boolean verifyLocationIsInStock(String locationId, Long warehouseId) {
|
|
|
BaseLocationInfo baseLocationInfo = selectBaseLocationInfoByIdOrNo(locationId, warehouseId);
|