From e26e6f4f980ea23b7b7bce6af3c1ea1b62285e7d Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期六, 24 五月 2025 14:53:05 +0800
Subject: [PATCH] no message

---
 rsf-admin/src/page/orders/outStock/OutOrderItemList.jsx                                      |    2 
 rsf-admin/src/page/work/outBound/OutBoundList.jsx                                            |    4 +-
 rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java    |    1 
 rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java |    4 ++
 rsf-admin/src/page/task/TaskList.jsx                                                         |    2 
 rsf-admin/src/page/orders/stock/OrderItemList.jsx                                            |   15 +++----
 rsf-server/src/main/Test/ChineseMD5Util.java                                                 |   76 +++++++++++---------------------------
 rsf-admin/src/page/basicInfo/loc/InitButton.jsx                                              |    1 
 8 files changed, 38 insertions(+), 67 deletions(-)

diff --git a/rsf-admin/src/page/basicInfo/loc/InitButton.jsx b/rsf-admin/src/page/basicInfo/loc/InitButton.jsx
index e1ffc03..418ad66 100644
--- a/rsf-admin/src/page/basicInfo/loc/InitButton.jsx
+++ b/rsf-admin/src/page/basicInfo/loc/InitButton.jsx
@@ -54,7 +54,6 @@
     const record = useRecordContext();
     const notify = useNotify();
     const refresh = useRefresh();
-
     const [createDialog, setCreateDialog] = useState(false);
 
     return (
diff --git a/rsf-admin/src/page/orders/outStock/OutOrderItemList.jsx b/rsf-admin/src/page/orders/outStock/OutOrderItemList.jsx
index dea641b..0461c77 100644
--- a/rsf-admin/src/page/orders/outStock/OutOrderItemList.jsx
+++ b/rsf-admin/src/page/orders/outStock/OutOrderItemList.jsx
@@ -136,7 +136,7 @@
               setSelect(record)
               setEditDialog(true)
             }}
-             omit={['id', 'createTime', 'createBy', 'memo', 'poDetlId', 'matnrId', 'asnId']}
+             omit={['id', 'createTime', 'createBy', 'memo', 'poDetlId', 'purQty','purUnit','trackCode','packName','splrName','matnrId', 'asnId']}
           >
             <NumberField source="id" />
             <NumberField source="asnId" label="table.field.outStockItem.asnId" />
diff --git a/rsf-admin/src/page/orders/stock/OrderItemList.jsx b/rsf-admin/src/page/orders/stock/OrderItemList.jsx
index b2f0a97..03f5658 100644
--- a/rsf-admin/src/page/orders/stock/OrderItemList.jsx
+++ b/rsf-admin/src/page/orders/stock/OrderItemList.jsx
@@ -60,14 +60,16 @@
 
 const filters = [
     <SearchInput source="condition" alwaysOn />,
-    <DateInput label='common.time.after' source="timeStart"  />,
-    <DateInput label='common.time.before' source="timeEnd"  />,
+    <DateInput label='common.time.after' source="timeStart" />,
+    <DateInput label='common.time.before' source="timeEnd" />,
     <NumberInput source="orderId" label="table.field.stockItem.orderId" />,
     <TextInput source="orderCode" label="table.field.stockItem.orderCode" />,
     <TextInput source="sourceItemId" label="table.field.stockItem.sourceItemId" />,
     <TextInput source="matnrId" label="table.field.stockItem.matnrId" />,
     <TextInput source="matnrCode" label="table.field.stockItem.matnrCode" />,
     <TextInput source="maktx" label="table.field.stockItem.maktx" />,
+    <TextInput source="locCode" label="table.field.loc.code" />,
+    <TextInput source="barcode" label="table.field.task.barcode" />,
     <NumberInput source="anfme" label="table.field.stockItem.anfme" />,
     <TextInput source="stockUnit" label="table.field.stockItem.stockUnit" />,
     <NumberInput source="workQty" label="table.field.stockItem.workQty" />,
@@ -132,7 +134,7 @@
                     rowClick={(id, resource, record) => false}
                     expand={false}
                     expandSingle={true}
-                    omit={['id', 'createTime', 'orderId', 'sourceItemId', 'matnrId', 'createBy','barcode', 'splrCode', 'splrBatch', 'updateBy$', 'createBy$', 'memo']}
+                    omit={['id', 'createTime', 'orderId', 'sourceItemId', 'matnrId', 'purUnit','splrCode', 'purQty', 'createBy', 'packName', 'prodTime', 'splrName', 'splrCode', 'batch', 'packName', 'updateBy$', 'createBy$', 'memo']}
                 >
                     <NumberField source="id" />
                     <NumberField source="orderId" label="table.field.stockItem.orderId" />
@@ -144,6 +146,8 @@
                     <NumberField source="anfme" label="table.field.stockItem.anfme" />
                     <TextField source="stockUnit" label="table.field.stockItem.stockUnit" />
                     <NumberField source="workQty" label="table.field.stockItem.workQty" />
+                    <TextField source="locCode" label="table.field.loc.code" />,
+                    <TextField source="barcode" label="table.field.task.barcode" />,
                     <NumberField source="purQty" label="table.field.stockItem.purQty" />
                     <TextField source="purUnit" label="table.field.stockItem.purUnit" />
                     <NumberField source="qty" label="table.field.stockItem.qty" />
@@ -152,7 +156,6 @@
                     <TextField source="splrBatch" label="table.field.stockItem.splrBatch" />
                     <TextField source="splrName" label="table.field.stockItem.splrName" />
                     <TextField source="trackCode" label="table.field.stockItem.trackCode" />
-                    <TextField source="barcode" label="table.field.stockItem.barcode" />
                     <TextField source="prodTime" label="table.field.stockItem.prodTime" />
                     <TextField source="packName" label="table.field.stockItem.packName" />
                     <TextField source="updateBy$" label="common.field.updateBy" />
@@ -161,10 +164,6 @@
                     <DateField source="createTime" label="common.field.createTime" showTime />
                     <BooleanField source="statusBool" label="common.field.status" sortable={false} />
                     <TextField source="memo" label="common.field.memo" sortable={false} />
-                    <WrapperField cellClassName="opt" label="common.field.opt">
-                        <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} />
-                        <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} />
-                    </WrapperField>
                 </StyledDatagrid>
             </List>
             <PageDrawer
diff --git a/rsf-admin/src/page/task/TaskList.jsx b/rsf-admin/src/page/task/TaskList.jsx
index 3792b7a..982d91b 100644
--- a/rsf-admin/src/page/task/TaskList.jsx
+++ b/rsf-admin/src/page/task/TaskList.jsx
@@ -218,7 +218,7 @@
     }
 
     return (
-        record?.taskStatus == 198 && record?.taskType == 103 ? <ConfirmButton label={"toolbar.pick"} startIcon={<ColorizeOutlinedIcon />} onConfirm={pickClick} /> : <></>
+        record?.taskStatus == 199 && record?.taskType == 103 ? <ConfirmButton label={"toolbar.pick"} startIcon={<ColorizeOutlinedIcon />} onConfirm={pickClick} /> : <></>
     )
 }
 
diff --git a/rsf-admin/src/page/work/outBound/OutBoundList.jsx b/rsf-admin/src/page/work/outBound/OutBoundList.jsx
index e7eea22..22aaa44 100644
--- a/rsf-admin/src/page/work/outBound/OutBoundList.jsx
+++ b/rsf-admin/src/page/work/outBound/OutBoundList.jsx
@@ -183,9 +183,9 @@
     }
     const http = async (sta, items) => {
         console.log(items);
-
+        const filZores = items.filter(item => item.outQty  <= 0.0);
         const filter = items.filter(item => (item.outQty + item.workQty) > item.anfme);
-        if (filter.length > 0) {
+        if (filter.length > 0 || filZores.length > 0) {
             notify(translate('toolbar.request.error.out_stock_qty'))
             return
         }
diff --git a/rsf-server/src/main/Test/ChineseMD5Util.java b/rsf-server/src/main/Test/ChineseMD5Util.java
index 963e6de..c73e2d3 100644
--- a/rsf-server/src/main/Test/ChineseMD5Util.java
+++ b/rsf-server/src/main/Test/ChineseMD5Util.java
@@ -1,70 +1,38 @@
 import java.nio.charset.StandardCharsets;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
+import java.util.ArrayList;
+import java.util.List;
 
 public class ChineseMD5Util {
 
-    /**
-     * 瀵规眽瀛楀瓧绗︿覆杩涜MD5鍔犲瘑
-     * @param input 瑕佸姞瀵嗙殑姹夊瓧瀛楃涓�
-     * @return 32浣嶅皬鍐橫D5鍝堝笇鍊�
-     * @throws NoSuchAlgorithmException
-     */
-    public static String md5Chinese(String input) throws NoSuchAlgorithmException {
-        if (input == null) {
-            return null;
+    public static List<Integer> getSelectedIndices(int[] arr) {
+        List<Integer> indices = new ArrayList<>();
+        int index = 0;
+        int step = 3;
+        while (index < arr.length) {
+            indices.add(index);
+            index += step;
+            step = (step == 3) ? 1 : 3;
         }
-
-        // 缁熶竴浣跨敤UTF-8缂栫爜
-        byte[] inputBytes = input.getBytes(StandardCharsets.UTF_8);
-
-        MessageDigest md = MessageDigest.getInstance("MD5");
-        byte[] digest = md.digest(inputBytes);
-
-        // 灏嗗瓧鑺傛暟缁勮浆鎹负16杩涘埗瀛楃涓�
-        StringBuilder sb = new StringBuilder();
-        for (byte b : digest) {
-            sb.append(String.format("%02x", b));
-        }
-
-        return sb.toString();
+        return indices;
     }
 
-    /**
-     * 楠岃瘉姹夊瓧瀛楃涓蹭笌MD5鍝堝笇鏄惁鍖归厤
-     * @param input 瑕侀獙璇佺殑姹夊瓧瀛楃涓�
-     * @param md5Hash 瀛樺偍鐨凪D5鍝堝笇鍊�
-     * @return 濡傛灉鍖归厤杩斿洖true锛屽惁鍒檉alse
-     */
-    public static boolean verifyChinese(String input, String md5Hash) {
-        try {
-            String computedHash = md5Chinese(input);
-            return computedHash.equals(md5Hash.toLowerCase());
-        } catch (NoSuchAlgorithmException e) {
-            // 鐞嗚涓婁笉浼氬彂鐢燂紝鍥犱负MD5鏄疛ava鏍囧噯搴撴敮鎸佺殑
-            return false;
+    public static Integer getNextSelectedValue(int[] arr, int inputIndex) {
+        List<Integer> selectedIndices = getSelectedIndices(arr);
+        int currentPos = selectedIndices.indexOf(inputIndex);
+        if (currentPos != -1 && currentPos + 1 < selectedIndices.size()) {
+            return arr[selectedIndices.get(currentPos + 1)];
         }
+        return null; // 鎴栨寜闇�澶勭悊
     }
 
     public static void main(String[] args) {
-        try {
-            String chineseText = "浣犲ソ锛屼笘鐣岋紒";
+        int[] arr = {2, 5, 8, 10, 15, 20, 25, 30, 35, 40, 45, 50, 15, 40, 32, 48};
+        System.out.println("杈撳叆 0锛岃緭鍑�: " + getNextSelectedValue(arr, 0)); // 10
+        System.out.println("杈撳叆 3锛岃緭鍑�: " + getNextSelectedValue(arr, 3)); // 15
+        System.out.println("杈撳叆 4锛岃緭鍑�: " + getNextSelectedValue(arr, 4)); // 30
+        System.out.println("杈撳叆 4锛岃緭鍑�: " + getNextSelectedValue(arr, 5)); // 30
 
-            // 鍔犲瘑
-            String md5Hash = md5Chinese(chineseText);
-            System.out.println("鍘熸枃: " + chineseText);
-            System.out.println("MD5鍝堝笇: " + md5Hash);
-
-            // 楠岃瘉
-            boolean isValid = verifyChinese(chineseText, md5Hash);
-            System.out.println("楠岃瘉缁撴灉: " + (isValid ? "鍖归厤" : "涓嶅尮閰�"));
-
-            // 閿欒楠岃瘉绀轰緥
-            boolean isWrongValid = verifyChinese("浣犲ソ锛屼笘鐣岋紒", md5Hash);
-            System.out.println("閿欒鏂囨湰楠岃瘉: " + (isWrongValid ? "鍖归厤" : "涓嶅尮閰�"));
-
-        } catch (NoSuchAlgorithmException e) {
-            e.printStackTrace();
-        }
     }
 }
\ No newline at end of file
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java
index 7b7266f..72a17c9 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocItemServiceImpl.java
@@ -138,6 +138,10 @@
                     throw new CoolException("搴撳瓨淇℃伅涓嶅瓨鍦紒");
                 }
 
+                if (locItem.getOutQty().compareTo(0.0) < 0) {
+                    throw new CoolException("鍑哄簱鏁伴噷涓嶈兘灏忎簬0锛侊紒");
+                }
+
                 if (locItem.getAnfme().compareTo(qty) < 0) {
                     Double minusQty = Math.round((locItem.getAnfme() - locItem.getWorkQty()) * 10000) / 10000.0;
                     item.setWorkQty(minusQty);
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
index 30f92ac..9f07251 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
@@ -780,6 +780,7 @@
         /**淇敼涓哄簱浣嶇姸鎬佷负O.绌哄簱*/
         if (!locService.update(new LambdaUpdateWrapper<Loc>()
                 .set(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_O.type)
+                .set(Loc::getBarcode, null)
                 .eq(Loc::getId, loc.getId()))) {
             throw new CoolException("搴撲綅鐘舵�佷慨鏀瑰け璐ワ紒锛�");
         }

--
Gitblit v1.9.1