From deb10b28cff67e731d0f6b268a91b9af5e76c3d9 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 10 四月 2024 14:41:13 +0800
Subject: [PATCH] #
---
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/service/MapService.java | 17 +++++
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/controller/result/ShuttleVo.java | 28 +++++++++
zy-asrs-flow/src/locales/en-US/map.ts | 19 ++++++
zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx | 75 ++++++++++++++++++++++++-
4 files changed, 134 insertions(+), 5 deletions(-)
diff --git a/zy-asrs-flow/src/locales/en-US/map.ts b/zy-asrs-flow/src/locales/en-US/map.ts
index 2bd63e2..66f582a 100644
--- a/zy-asrs-flow/src/locales/en-US/map.ts
+++ b/zy-asrs-flow/src/locales/en-US/map.ts
@@ -12,6 +12,18 @@
'': '',
'': '',
'map.loc.no': 'Location Number',
+ 'map.task.no': 'Task Number',
+ 'map.device.status': 'Device Status',
+ 'map.origin.site': 'Origin Site',
+ 'map.origin.loc': 'Origin Location',
+ 'map.dest.site': 'Destination Site',
+ 'map.dest.loc': 'Destination Location',
+ 'map.error': 'Error',
+ 'map.pakmk': 'PakMk',
+ '': '',
+ '': '',
+ '': '',
+ '': '',
'map.pallet.barcode': 'Pallet Barcode',
'map.is.enable': 'Enable or Not',
'map.loc.operation': 'Location Operation',
@@ -28,6 +40,13 @@
'': '',
'': '',
'map.shuttle.no': 'Shuttle Number',
+ 'map.shuttle.current.code': 'Current Code',
+ 'map.shuttle.batter.power': 'Batter Power',
+ 'map.shuttle.batter.voltage': 'Batter Voltage',
+ 'map.shuttle.batter.temp': 'Batter Temperature',
+ 'map.shuttle.has.lift': 'Has Lift',
+ 'map.shuttle.has.pallet': 'Has Pallet',
+ 'map.shuttle.has.charge': 'Charging',
'': '',
'': '',
'': '',
diff --git a/zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx b/zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx
index f3c5508..b541637 100644
--- a/zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx
+++ b/zy-asrs-flow/src/pages/map/drawer/shuttle/view.jsx
@@ -49,6 +49,10 @@
fetchShuttleInfo(data.no);
}, [data]);
+ useEffect(() => {
+ console.log(info);
+ }, [info])
+
return (
<>
<div className={styles.infoBox}>
@@ -59,18 +63,83 @@
<Descriptions
bordered
title=''
- size='small'
- layout="vertical"
+ size='middle' // default | middle | small
+ layout="vertical" // horizontal | vertical
column={3}
items={
[
{
key: '1',
- label: intl.formatMessage({ id: 'map.conveyor.no', defaultMessage: '绌挎杞︾紪鍙�' }),
+ label: intl.formatMessage({ id: 'map.shuttle.no', defaultMessage: '绌挎杞︾紪鍙�' }),
children: info?.shuttleNo,
},
{
key: '1',
+ label: intl.formatMessage({ id: 'map.task.no', defaultMessage: '浠诲姟鍙�' }),
+ children: info?.taskNo,
+ },
+ {
+ key: '1',
+ label: intl.formatMessage({ id: 'map.device.status', defaultMessage: '璁惧鐘舵��' }),
+ children: info?.status,
+ },
+ {
+ key: '1',
+ label: intl.formatMessage({ id: 'map.origin.loc', defaultMessage: '璧峰搴撲綅' }),
+ children: info?.originLocNo,
+ },
+ {
+ key: '1',
+ label: intl.formatMessage({ id: 'map.dest.loc', defaultMessage: '鐩爣搴撲綅' }),
+ children: info?.destLocNo,
+ },
+ {
+ key: '1',
+ label: intl.formatMessage({ id: 'map.shuttle.current.code', defaultMessage: '瀹氫綅鏉$爜' }),
+ children: info?.currentCode,
+ },
+ {
+ key: '1',
+ label: intl.formatMessage({ id: 'map.shuttle.batter.power', defaultMessage: '鐢垫睜鐢甸噺' }),
+ children: info?.batteryPower,
+ },
+ {
+ key: '1',
+ label: intl.formatMessage({ id: 'map.shuttle.batter.voltage', defaultMessage: '鐢垫睜鐢靛帇' }),
+ children: info?.batteryVoltage,
+ },
+ {
+ key: '1',
+ label: intl.formatMessage({ id: 'map.shuttle.batter.temp', defaultMessage: '鐢垫睜娓╁害' }),
+ children: info?.batteryTemp,
+ },
+ {
+ key: '1',
+ label: intl.formatMessage({ id: 'map.shuttle.has.lift', defaultMessage: '椤跺崌淇″彿' }),
+ children: info?.hasLift,
+ },
+ {
+ key: '1',
+ label: intl.formatMessage({ id: 'map.shuttle.has.pallet', defaultMessage: '鎵樼洏淇″彿' }),
+ children: info?.hasPallet,
+ },
+ {
+ key: '1',
+ label: intl.formatMessage({ id: 'map.shuttle.has.charge', defaultMessage: '鍏呯數淇″彿' }),
+ children: info?.hasCharge,
+ },
+ {
+ key: '1',
+ label: intl.formatMessage({ id: 'map.error', defaultMessage: '寮傚父淇″彿' }),
+ children: info?.errorCode,
+ },
+ {
+ key: '1',
+ label: intl.formatMessage({ id: 'map.pakmk', defaultMessage: '浣滀笟鏍囪' }),
+ children: info?.pakMk,
+ },
+ {
+ key: '1',
label: intl.formatMessage({ id: 'map.loc.no', defaultMessage: '搴撲綅鍙�' }),
children: <Badge status="processing" text="Running" />,
},
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/controller/result/ShuttleVo.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/controller/result/ShuttleVo.java
index 34b80f4..b0e536c 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/controller/result/ShuttleVo.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/controller/result/ShuttleVo.java
@@ -8,6 +8,32 @@
@Data
public class ShuttleVo {
- private String shuttleNo;
+ private String shuttleNo = "-";
+
+ private String taskNo = "-";
+
+ private String status = "-";
+
+ private String originLocNo = "-";
+
+ private String destLocNo = "-";
+
+ private String currentCode = "-";
+
+ private String batteryPower = "-";
+
+ private String batteryVoltage = "-";
+
+ private String batteryTemp = "-";
+
+ private Boolean hasLift = false;
+
+ private Boolean hasPallet = false;
+
+ private Boolean hasCharge = false;
+
+ private String errorCode = "-";
+
+ private Boolean pakMk = false;
}
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/service/MapService.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/service/MapService.java
index b7f0db8..da29ce0 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/service/MapService.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/service/MapService.java
@@ -10,6 +10,7 @@
import com.zy.asrs.wcs.core.map.controller.result.LocVo;
import com.zy.asrs.wcs.core.map.controller.result.ShuttleVo;
import com.zy.asrs.wcs.core.utils.Utils;
+import com.zy.asrs.wcs.rcs.model.protocol.ShuttleProtocol;
import com.zy.asrs.wcs.system.entity.Dict;
import com.zy.asrs.wcs.system.service.DictService;
import com.zy.asrs.wcs.system.service.UserService;
@@ -95,7 +96,21 @@
public ShuttleVo getShuttleInfo(String shuttleNo) {
ShuttleVo vo = new ShuttleVo();
vo.setShuttleNo(shuttleNo);
-
+ ShuttleProtocol protocol = new ShuttleProtocol();
+ // todo checkout protocol
+// vo.setTaskNo(String.valueOf(protocol.getTaskNo()));
+// vo.setStatus(protocol.getProtocolStatusType().desc);
+// vo.setOriginLocNo(protocol.getSourceLocNo());
+// vo.setDestLocNo(protocol.getLocNo());
+// vo.setCurrentCode(protocol.getCurrentCode());
+// vo.setBatteryPower(protocol.getBatteryPower());
+// vo.setErrorCode(protocol.getErrorCode());
+// vo.setBatteryTemp(protocol.getBatteryTemp());
+// vo.setHasLift(protocol.getHasLift());
+// vo.setHasPallet(protocol.getHasPallet());
+// vo.setHasCharge(protocol.getHasCharge());
+// vo.setBatteryVoltage(String.valueOf(protocol.getBatteryVoltage()));
+// vo.setPakMk(protocol.getPakMk());
return vo;
}
--
Gitblit v1.9.1