From 62f1b31c5de20f02bc89684937c0d4f3ec3d2c82 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期六, 22 六月 2024 14:43:20 +0800
Subject: [PATCH] #

---
 zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/KernelService.java  |    4 ++++
 zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/timer/MotionTimer.java     |   16 ++++++++++++----
 zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java |    2 ++
 zy-asrs-flow/src/pages/map/index.jsx                                      |   28 +++++++++++++++++++---------
 zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/domain/dto/MotionDto.java  |    3 +++
 5 files changed, 40 insertions(+), 13 deletions(-)

diff --git a/zy-asrs-flow/src/pages/map/index.jsx b/zy-asrs-flow/src/pages/map/index.jsx
index 6e970a7..8407a6d 100644
--- a/zy-asrs-flow/src/pages/map/index.jsx
+++ b/zy-asrs-flow/src/pages/map/index.jsx
@@ -1,7 +1,7 @@
 import * as React from 'react'
 import * as TWEEDLE from 'tweedle.js';
 import { FormattedMessage, useIntl, useModel } from '@umijs/max';
-import { Layout, Button, Flex, Row, Col, FloatButton, Select, notification, Segmented, message } from 'antd';
+import { Layout, Button, Flex, Row, Col, FloatButton, Select, notification, Segmented, message, Popconfirm } from 'antd';
 const { Header, Content } = Layout;
 import {
     AppstoreAddOutlined,
@@ -250,6 +250,10 @@
     }, [curSprite]);
     const prevCurSprite = prevCurSpriteRef.current;
 
+    const clearLockPathConfirm = (e) => {
+        clearLockPath(curFloor);
+    };
+
     const clearLockPath = async (floor) => {
         const hide = message.loading(intl.formatMessage({ id: 'page.clearing', defaultMessage: '姝e湪娓呯┖' }));
         try {
@@ -345,15 +349,21 @@
 
                                 {model === MapModel.OBSERVER_MODEL && (
                                     <>
-                                        <Button
-                                            className='map-header-button'
-                                            size={'large'}
-                                            onClick={() => {
-                                                clearLockPath(curFloor)
-                                            }}
+                                        <Popconfirm
+                                            title="娓呯┖璺緞"
+                                            description="姝ゆ搷浣滃彲鑳藉鑷村皬杞︾鎾烇紝纭娓呯┖璺緞鍚楋紵"
+                                            onConfirm={clearLockPathConfirm}
+                                            okText="纭"
+                                            cancelText="鍙栨秷"
                                         >
-                                            <FormattedMessage id='map.clearLockPath' defaultMessage='娓呯┖璺緞' />
-                                        </Button>
+                                            <Button
+                                                className='map-header-button'
+                                                size={'large'}
+                                            >
+                                                <FormattedMessage id='map.clearLockPath' defaultMessage='娓呯┖璺緞' />
+                                            </Button>
+                                        </Popconfirm>
+
 
                                         <Button
                                             className='map-header-button'
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/domain/dto/MotionDto.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/domain/dto/MotionDto.java
index 03e3d94..66fcff2 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/domain/dto/MotionDto.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/domain/dto/MotionDto.java
@@ -29,6 +29,9 @@
 
     protected Integer wrkNo;
 
+    //鍚屾 1: 鏄�  0: 鍚�
+    private Integer sync;
+
     public static MotionDto build(BuildSupport<MotionDto> support) {
         MotionDto dto = new MotionDto();
 
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java
index f3d9b42..04ba1a8 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java
@@ -634,6 +634,7 @@
                             dto.setLiftNo(transferLiftDevice.getId().intValue());
                             dto.setLev(5);//绱㈢墝椤圭洰5灞傛槸杈撻�佺嚎灞�
                             dto.setStaNo(1);//鎻愬崌鏈哄乏渚�
+                            dto.setSync(0);//寮傛鎵ц
                         }))
                 ));
 
@@ -892,6 +893,7 @@
                             dto.setLiftNo(transferLiftDevice.getId().intValue());
                             dto.setLev(5);//绱㈢墝椤圭洰5灞傛槸杈撻�佺嚎灞�
                             dto.setStaNo(1);//鎻愬崌鏈哄乏渚�
+                            dto.setSync(0);//寮傛鎵ц
                         }))
                 ));
 
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/KernelService.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/KernelService.java
index 313e204..b0b342d 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/KernelService.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/KernelService.java
@@ -84,6 +84,10 @@
             }
             motion.setTarget(String.valueOf(liftDispatcher.getLiftLevOffset(target.getLiftNo(), target.getLev())));
             motion.setTarDrt(target.getStaNo());//鐩爣绔�
+
+            if (target.getSync() != null) {
+                motion.setSync(target.getSync());
+            }
         }));
 
         return motionList;
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/timer/MotionTimer.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/timer/MotionTimer.java
index 1cb6c4e..52193e6 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/timer/MotionTimer.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/timer/MotionTimer.java
@@ -48,7 +48,9 @@
         for (Task task : taskService.selectByAnalyzeSts()) {
             Motion executingMotion = motionService.selectOfTop1(task.getUuid(), MotionStsType.EXECUTING.val(), task.getHostId());
             if (executingMotion != null) {//瀛樺湪姝e湪鎵ц鐨刴otion
-                continue;
+                if (executingMotion.getSync() == 1) {//褰撳墠鎵ц涓殑鍔ㄤ綔鏄悓姝ュ姩浣滐紝绛夊緟鎵ц瀹屾垚鍚庡啀鎵ц涓嬩竴涓姩浣�
+                    continue;
+                }
             }
 
             Motion motion = motionService.selectOfTop1(task.getUuid(), MotionStsType.INIT.val(), task.getHostId());
@@ -112,7 +114,9 @@
         for (Task taskCharge : taskService.selectChargeByAnalyzeSts()) {
             Motion executingMotion = motionService.selectOfTop1(taskCharge.getUuid(), MotionStsType.EXECUTING.val(), taskCharge.getHostId());
             if (executingMotion != null) {//瀛樺湪姝e湪鎵ц鐨刴otion
-                continue;
+                if (executingMotion.getSync() == 1) {//褰撳墠鎵ц涓殑鍔ㄤ綔鏄悓姝ュ姩浣滐紝绛夊緟鎵ц瀹屾垚鍚庡啀鎵ц涓嬩竴涓姩浣�
+                    continue;
+                }
             }
 
             Motion motion = motionService.selectOfTop1(taskCharge.getUuid(), MotionStsType.INIT.val(), taskCharge.getHostId());
@@ -175,7 +179,9 @@
         for (Task task : taskService.selectManualByAnalyzeSts()) {
             Motion executingMotion = motionService.selectOfTop1(task.getUuid(), MotionStsType.EXECUTING.val(), task.getHostId());
             if (executingMotion != null) {//瀛樺湪姝e湪鎵ц鐨刴otion
-                continue;
+                if (executingMotion.getSync() == 1) {//褰撳墠鎵ц涓殑鍔ㄤ綔鏄悓姝ュ姩浣滐紝绛夊緟鎵ц瀹屾垚鍚庡啀鎵ц涓嬩竴涓姩浣�
+                    continue;
+                }
             }
 
             Motion motion = motionService.selectOfTop1(task.getUuid(), MotionStsType.INIT.val(), task.getHostId());
@@ -232,7 +238,9 @@
         for (Task task : taskService.selectMoveByAnalyzeSts()) {
             Motion executingMotion = motionService.selectOfTop1(task.getUuid(), MotionStsType.EXECUTING.val(), task.getHostId());
             if (executingMotion != null) {//瀛樺湪姝e湪鎵ц鐨刴otion
-                continue;
+                if (executingMotion.getSync() == 1) {//褰撳墠鎵ц涓殑鍔ㄤ綔鏄悓姝ュ姩浣滐紝绛夊緟鎵ц瀹屾垚鍚庡啀鎵ц涓嬩竴涓姩浣�
+                    continue;
+                }
             }
 
             Motion motion = motionService.selectOfTop1(task.getUuid(), MotionStsType.INIT.val(), task.getHostId());

--
Gitblit v1.9.1