#
Junjie
2024-01-11 901b2ab3e0e7c592602848cfa256f34c5b0c7bb8
zy-asrs-common/src/main/java/com/zy/asrs/common/sys/service/impl/StaDescServiceImpl.java
@@ -1,19 +1,28 @@
package com.zy.asrs.common.sys.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.zy.asrs.common.wms.mapper.StaDescMapper;
import com.zy.asrs.common.domain.entity.StaDesc;
import com.zy.asrs.common.sys.service.StaDescService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
@Service("staDescService")
public class StaDescServiceImpl extends ServiceImpl<StaDescMapper, StaDesc> implements StaDescService {
    @Override
    public List<Integer> queryOutStaNosByLocNo(String locNo, Integer typeNo) {
        return this.baseMapper.queryOutStaNosByLocNo(locNo, typeNo);
    public List<Integer> queryOutStaNosByLocNo(String locNo, Integer typeNo, Long hostId) {
        ArrayList<Integer> list = new ArrayList<>();
        LambdaQueryWrapper<StaDesc> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(StaDesc::getTypeNo, typeNo);
        wrapper.eq(StaDesc::getHostId, hostId);
        for (StaDesc staDesc : this.list(wrapper)) {
            list.add(staDesc.getStnNo());
        }
        return list;
    }
}