From b7897958c4f095af331c329865cbd1f715673896 Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期二, 27 一月 2026 09:39:33 +0800
Subject: [PATCH] #

---
 zy-acs-manager/src/main/java/com/zy/acs/manager/manager/entity/Sta.java |   17 +++++++++--------
 zy-acs-flow/src/page/sta/StaCreate.jsx                                  |   18 +++++++++++++-----
 zy-acs-flow/src/page/sta/StaPanel.jsx                                   |    4 ++--
 zy-acs-flow/src/i18n/en.js                                              |    3 ++-
 zy-acs-flow/src/i18n/zh.js                                              |    3 ++-
 zy-acs-flow/src/page/sta/rowSx.jsx                                      |   14 ++++++++++++++
 6 files changed, 42 insertions(+), 17 deletions(-)

diff --git a/zy-acs-flow/src/i18n/en.js b/zy-acs-flow/src/i18n/en.js
index cd64e21..7fb2b64 100644
--- a/zy-acs-flow/src/i18n/en.js
+++ b/zy-acs-flow/src/i18n/en.js
@@ -92,7 +92,8 @@
         earlier: 'Earlier...',
     },
     validate: {
-        pwdMisMatch: 'The password confirmation is not the same as the password.'
+        pwdMisMatch: 'The password confirmation is not the same as the password.',
+        gtZero: 'The value must be greater than 0.',
     },
     settings: {
         base: 'Base',
diff --git a/zy-acs-flow/src/i18n/zh.js b/zy-acs-flow/src/i18n/zh.js
index 03ceaf9..0684347 100644
--- a/zy-acs-flow/src/i18n/zh.js
+++ b/zy-acs-flow/src/i18n/zh.js
@@ -92,7 +92,8 @@
         earlier: '鏇存棭...',
     },
     validate: {
-        pwdMisMatch: '瀵嗙爜涓嶄竴鑷�'
+        pwdMisMatch: '瀵嗙爜涓嶄竴鑷�',
+        gtZero: '璇疯緭鍏ュぇ浜�0鐨勬暟鍊�',
     },
     settings: {
         base: '鍩烘湰璁剧疆',
diff --git a/zy-acs-flow/src/page/sta/StaCreate.jsx b/zy-acs-flow/src/page/sta/StaCreate.jsx
index dee5771..82fa046 100644
--- a/zy-acs-flow/src/page/sta/StaCreate.jsx
+++ b/zy-acs-flow/src/page/sta/StaCreate.jsx
@@ -1,4 +1,4 @@
-import React, { useState, useRef, useEffect, useMemo } from "react";
+import React, { useMemo } from "react";
 import {
     CreateBase,
     useTranslate,
@@ -36,6 +36,12 @@
 
     const translate = useTranslate();
     const notify = useNotify();
+    const greaterThanZero = useMemo(() => (value) => {
+        if (value === undefined || value === null || value === '') {
+            return undefined;
+        }
+        return Number(value) >= 0 ? undefined : translate('validate.gtZero');
+    }, [translate]);
 
     const handleClose = (event, reason) => {
         if (reason !== "backdropClick") {
@@ -150,7 +156,7 @@
                                     <NumberInput
                                         label="table.field.sta.capacity"
                                         source="capacity"
-                                        validate={required()}
+                                        validate={[required(), greaterThanZero]}
                                     />
                                 </Grid>
                                 {/* <Grid item xs={6} display="flex" gap={1}>
@@ -164,33 +170,35 @@
                                     <NumberInput
                                         label="table.field.sta.height"
                                         source="height"
-                                        validate={required()}
+                                        validate={[required(), greaterThanZero]}
                                     />
                                 </Grid>
                                 <Grid item xs={6} display="flex" gap={1}>
                                     <NumberInput
                                         label="table.field.sta.depth"
                                         source="depth"
-                                        validate={required()}
+                                        validate={[required(), greaterThanZero]}
                                     />
                                 </Grid>
                                 <Grid item xs={6} display="flex" gap={1}>
                                     <NumberInput
                                         label="table.field.sta.angle"
                                         source="angle"
-                                        validate={required()}
+                                        validate={[required(), greaterThanZero]}
                                     />
                                 </Grid>
                                 <Grid item xs={6} display="flex" gap={1}>
                                     <NumberInput
                                         label="table.field.sta.inboundWait"
                                         source="inboundWait"
+                                        validate={greaterThanZero}
                                     />
                                 </Grid>
                                 <Grid item xs={6} display="flex" gap={1}>
                                     <NumberInput
                                         label="table.field.sta.outboundWait"
                                         source="outboundWait"
+                                        validate={greaterThanZero}
                                     />
                                 </Grid>
                                 {/* <Grid item xs={6} display="flex" gap={1}>
diff --git a/zy-acs-flow/src/page/sta/StaPanel.jsx b/zy-acs-flow/src/page/sta/StaPanel.jsx
index 88d4d94..d73a5bb 100644
--- a/zy-acs-flow/src/page/sta/StaPanel.jsx
+++ b/zy-acs-flow/src/page/sta/StaPanel.jsx
@@ -163,14 +163,14 @@
                     {/* <Typography variant="subtitle2" color="textSecondary" gutterBottom>
                         {translate('common.field.status')}
                     </Typography> */}
-                    <Grid container spacing={2}>
+                    {/* <Grid container spacing={2}>
                         {STATUS_FIELDS.map(({ key, labelKey }) => (
                             <Grid item xs={6} sm={3} key={key}>
                                 <StatusIndicator labelKey={labelKey} value={record[key]} />
                             </Grid>
                         ))}
                     </Grid>
-                    <Divider sx={{ my: 2 }} />
+                    <Divider sx={{ my: 2 }} /> */}
 
                     <Box>
                         <Typography variant="subtitle1" gutterBottom>
diff --git a/zy-acs-flow/src/page/sta/rowSx.jsx b/zy-acs-flow/src/page/sta/rowSx.jsx
index ac14e60..2c60897 100644
--- a/zy-acs-flow/src/page/sta/rowSx.jsx
+++ b/zy-acs-flow/src/page/sta/rowSx.jsx
@@ -15,6 +15,20 @@
             backgroundColor: 'action.selected',
         };
     }
+    if (record.staType$ === 'ROLLER')
+        return {
+            ...style,
+            borderLeftColor: orange[500],
+            borderLeftWidth: 5,
+            borderLeftStyle: 'solid',
+        };
+    if (record.staType$ === 'RACK')
+        return {
+            ...style,
+            borderLeftColor: blue[500],
+            borderLeftWidth: 5,
+            borderLeftStyle: 'solid',
+        };
     if (record.connect)
         return {
             ...style,
diff --git a/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/entity/Sta.java b/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/entity/Sta.java
index 508194c..3b1b259 100644
--- a/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/entity/Sta.java
+++ b/zy-acs-manager/src/main/java/com/zy/acs/manager/manager/entity/Sta.java
@@ -6,6 +6,7 @@
 import com.zy.acs.framework.common.Cools;
 import com.zy.acs.framework.common.SpringUtils;
 import com.zy.acs.manager.manager.service.CodeService;
+import com.zy.acs.manager.manager.service.StaTypeService;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
@@ -121,14 +122,14 @@
 //        return null;
 //    }
 //
-//    public String getStaType$(){
-//        StaTypeService service = SpringUtils.getBean(StaTypeService.class);
-//        StaType staType = service.getById(this.staType);
-//        if (!Cools.isEmpty(staType)){
-//            return String.valueOf(staType.getName());
-//        }
-//        return null;
-//    }
+    public String getStaType$(){
+        StaTypeService service = SpringUtils.getBean(StaTypeService.class);
+        StaType staType = service.getById(this.staType);
+        if (!Cools.isEmpty(staType)){
+            return String.valueOf(staType.getUuid());
+        }
+        return null;
+    }
 //
     public String getCode$(){
         CodeService service = SpringUtils.getBean(CodeService.class);

--
Gitblit v1.9.1