自动化立体仓库 - WMS系统
1
zhang
2025-09-16 323d014b95241cd42dfa01227dd4a15575f58a2b
src/main/java/com/zy/asrs/task/AutoMoveScheduler.java
@@ -68,7 +68,7 @@
     * crnNo :2目标楼层
     */
    @Scheduled(cron = "0/10 * * * * ? ")
    private synchronized void execute2() {
    public synchronized void execute2() {
        List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>().eq("wrk_sts", 22).andNew().eq("io_type", 108).andNew().eq("crn_no", 2).or().eq("crn_no", 3).orderBy("io_pri", false).orderBy("appe_time", true));
        if (agvWrkMastList.isEmpty()) {
            return;
@@ -112,7 +112,7 @@
     * ioType 111.手动调拨
     */
    @Scheduled(cron = "0/10 * * * * ? ")
    private void execute3() {
    public void execute3() {
        List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>().eq("wrk_sts", 22).andNew().eq("io_type", 111).orderBy("io_pri", false).orderBy("appe_time", true));
        if (agvWrkMastList.isEmpty()) {
            return;
@@ -127,8 +127,8 @@
    }
    @Scheduled(cron = "0/2 * * * * ? ")
    private void execute4() {
    //@Scheduled(cron = "0/2 * * * * ? ")
    public void execute4() {
        List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>().eq("wrk_sts", 22).andNew().eq("io_type", 114).orderBy("io_pri", false).orderBy("appe_time", true));
        if (agvWrkMastList.isEmpty()) {
            return;
@@ -145,7 +145,7 @@
//    // 空板自动回库  库位-接驳点
//    //@Scheduled(cron = "0/2 * * * * ? ")
//    private void autoEmptyBack(){
//    public void autoEmptyBack(){
//        // 查询 不为1楼的空货架
//        List<AgvLocMast> agvLocMasts = agvLocMastService.selectList(
//                new EntityWrapper<AgvLocMast>()
@@ -170,8 +170,8 @@
     * wrkSts 214.空料架回流待分配
     * ioType 113.空托盘手动回流
     */
    @Scheduled(cron = "0/2 * * * * ? ")
    private void autoEmptyBack3() {
    @Scheduled(cron = "0/4 * * * * ? ")
    public void autoEmptyBack3() {
        // 工作档为201 且 入出库类型为109
        List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>().eq("wrk_sts", 214).eq("loc_no", "").eq("io_type", 113).orderBy("io_pri", false));
        if (agvWrkMastList.isEmpty()) {
@@ -215,7 +215,7 @@
     * 2楼或3楼站点可入信号全部没有,代表走电梯自动搬运模式
     */
    @Scheduled(cron = "0/30 * * * * ? ")
    private void autoEmptyBack4() {
    public void autoEmptyBack4() {
        List<AgvLocMast> agvLocMasts = agvLocMastService.selectList(new EntityWrapper<AgvLocMast>()
                // TODO 四期
                .eq("loc_sts", "D").eq("loc_type1", 3).andNew().ne("floor", 1).or().ne("lev1", 1));
@@ -266,7 +266,7 @@
     */
    // TODO 四期
    @Scheduled(cron = "0/10 * * * * ? ")
    private void autoEmptyBackSiqi() {
    public void autoEmptyBackSiqi() {
        Config config2 = configService.selectOne(new EntityWrapper<Config>().eq("code", "RETURN_6_EMPTY"));
        //先判断空库位数了
        List<AgvLocMast> agvLocMasts = agvLocMastService.selectList(new EntityWrapper<AgvLocMast>().eq("loc_type1", 6).eq("floor", 1).eq("lev1", 2).eq("loc_sts", "O"));
@@ -307,7 +307,7 @@
    }
    private void executeLocType6() {
    public void executeLocType6() {
        // 查询 二厂的的半成品箱壳类型的空货架
        List<AgvLocMast> agvLocMasts = agvLocMastService.selectList(new EntityWrapper<AgvLocMast>().eq("loc_sts", "D").eq("loc_type1", 6).in("floor", 2,3).orderBy("bay1",false));
        if (agvLocMasts.isEmpty()) {
@@ -322,7 +322,7 @@
        }
    }
    private boolean determineFloorConnection(Integer floor) {
    public boolean determineFloorConnection(Integer floor) {
        try {
            List<AgvBasDevp> agvBasDevps = agvBasDevpService.selectList(new EntityWrapper<AgvBasDevp>().eq("floor", floor).like("dev_no", "DB_"));
            if (!agvBasDevps.isEmpty()) {
@@ -345,8 +345,8 @@
     * 手动: 生成 113 手动回流
     * 优先选择先到接驳位(接驳位可入) 后选择直接回库
     */
    @Scheduled(cron = "0/2 * * * * ? ")
    private void autoEmptyBack5() {
    @Scheduled(cron = "0/8 * * * * ? ")
    public void autoEmptyBack5() {
        List<AgvBasDevp> agvBasDevps = agvBasDevpService.selectList(new EntityWrapper<AgvBasDevp>().ne("floor", 1).eq("loc_sts", "F").like("dev_no", "DB"));
        if (agvBasDevps.isEmpty()) {
            return;
@@ -365,7 +365,7 @@
     * 手动: 生成 113 手动回流
     */
    @Scheduled(cron = "0/30 * * * * ? ")
    private void autoEmptyBack6() {
    public void autoEmptyBack6() {
        List<AgvBasDevp> agvBasDevps = agvBasDevpService.selectList(new EntityWrapper<AgvBasDevp>().eq("floor", 1).eq("loc_sts", "F").like("dev_no", "DB"));
        if (agvBasDevps.isEmpty()) {
            return;
@@ -382,8 +382,8 @@
    /**
     * 跨层自动移库
     */
    @Scheduled(cron = "0/2 * * * * ? ")
    private void autoEmptyBack7() throws ParseException {
    @Scheduled(cron = "0/8 * * * * ? ")
    public void autoEmptyBack7() throws ParseException {
        Date now = new Date();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        String currentDay = sdf.format(now);
@@ -431,7 +431,7 @@
     * 在库位不够的情况下,箱壳入库别的楼层库位的时候,晚上进行跨层移库
     */
    @Scheduled(cron = "0/30 * * * * ? ")
    private void autoEmptyBack8() throws ParseException {
    public void autoEmptyBack8() throws ParseException {
        Date now = new Date();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        String currentDay = sdf.format(now);