自动化立体仓库 - WMS系统
Junjie
2024-02-19 f3603d9f0eb85d2a42edbcadd0950889af2c24d2
src/main/java/com/zy/asrs/mapper/AgvBasDevpMapper.java
@@ -4,12 +4,40 @@
import com.zy.asrs.entity.AgvBasDevp;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
@Mapper
@Repository
public interface AgvBasDevpMapper extends BaseMapper<AgvBasDevp> {
    @Delete("delete from agv_bas_devp")
    public void deleteAll();
    void deleteAll();
    @Select("select dev_no from agv_bas_devp where loc_sts = 'O'")
    List<String> getAvailableEmptyInSite();
    @Select("select station_code from agv_bas_devp where floor = #{floor} and cache_shelves = 'N' and in_enable = 'Y' group by station_code")
    List<String> selectCacheShelvesStationCodeByFloor(@Param("floor") int floor);
    @Select("SELECT\n" +
            "\tbas.dev_no,\n" +
            "\tCOUNT ( mast.loc_no ) AS num \n" +
            "FROM\n" +
            "\tagv_bas_devp bas\n" +
            "\tLEFT JOIN agv_wrk_mast mast ON bas.dev_no = mast.loc_no \n" +
            "WHERE\n" +
            "\tbas.station_code = #{stationCode} AND bas.loc_sts != 'X' \n" +
            "GROUP BY\n" +
            "\tbas.dev_no \n" +
            "ORDER BY\n" +
            "\tnum")
    List<Map<String,Object>> selectDevNoAndNumBystationCode(@Param("stationCode") String stationCode);
    @Select("select station_code from agv_bas_devp group by station_code")
    List<String> selectAllStationCode();
}