From c4c29d91cccfccf457594b87d09c0181f8810ba2 Mon Sep 17 00:00:00 2001
From: Junjie <xjj@123>
Date: 星期一, 25 三月 2024 11:18:36 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/Four-Way-Rack' into Four-Way-Rack

---
 zy-asrs-flow/src/locales/en-US.ts                        |    1 
 zy-asrs-flow/src/pages/map/batch/index.jsx               |  234 ++--------------------
 zy-asrs-flow/src/pages/map/player.js                     |   26 +-
 zy-asrs-flow/src/pages/map/batch/modify.jsx              |  223 ++++++++++++++++++++++
 zy-asrs-flow/src/locales/en-US/map.ts                    |   13 +
 zy-asrs-flow/src/pages/map/components/configSettings.jsx |    9 
 zy-asrs-flow/src/pages/map/index.jsx                     |   17 +
 zy-asrs-wcs/src/main/resources/application.yml           |    4 
 zy-asrs-flow/src/pages/map/utils.js                      |   30 +++
 zy-asrs-flow/src/pages/map/header/search.jsx             |    5 
 10 files changed, 337 insertions(+), 225 deletions(-)

diff --git a/zy-asrs-flow/src/locales/en-US.ts b/zy-asrs-flow/src/locales/en-US.ts
index 61f4e4e..7c9b0c6 100644
--- a/zy-asrs-flow/src/locales/en-US.ts
+++ b/zy-asrs-flow/src/locales/en-US.ts
@@ -5,6 +5,7 @@
   'commont.enter':'Please enter',
   'commont.select':'Please select',
   'common.submit':'Submit',
+  'common.confirm':'Confirm',
   'common.cancel':'Cancel',
   'common.reset':'Reset',
   'common.username':'Username',
diff --git a/zy-asrs-flow/src/locales/en-US/map.ts b/zy-asrs-flow/src/locales/en-US/map.ts
index 569eda2..6bf9be9 100644
--- a/zy-asrs-flow/src/locales/en-US/map.ts
+++ b/zy-asrs-flow/src/locales/en-US/map.ts
@@ -43,6 +43,19 @@
     'map.settings.bottom': 'Bottom',
     'map.settings.map.param': 'Map Parameters',
     'map.settings.config.param': 'Config Parameters',
+    'map.settings.batch.select.shelf': 'Select Shelfs',
+    'map.settings.batch.set.params': 'Set Parameters',
+    'map.settings.batch.result': 'Result',
+    'map.settings.batch.result.title': 'Batch settings successful!',
+    '': '',
+    '': '',
+    '': '',
+    '': '',
+    '': '',
+    '': '',
+    '': '',
+    '': '',
+    '': '',
     '': '',
     '': '',
     'map.settings.no': 'No.',
diff --git a/zy-asrs-flow/src/pages/map/batch/index.jsx b/zy-asrs-flow/src/pages/map/batch/index.jsx
index 31771f8..23b4e39 100644
--- a/zy-asrs-flow/src/pages/map/batch/index.jsx
+++ b/zy-asrs-flow/src/pages/map/batch/index.jsx
@@ -1,54 +1,27 @@
 import React, { useState, useRef, useEffect } from 'react';
-import { Drawer, Space, Button, Card, Select, InputNumber, Input, Result, Form } from 'antd';
-import {
-    ProCard,
-    ProForm,
-    ProFormCheckbox,
-    ProFormDatePicker,
-    ProFormDateRangePicker,
-    ProFormSelect,
-    ProFormText,
-    ProFormTextArea,
-    StepsForm,
-} from '@ant-design/pro-components';
+import { Drawer, Space, Button, Card } from 'antd';
 import { FormattedMessage, useIntl, useModel } from '@umijs/max';
 import { createStyles } from 'antd-style';
 import * as Utils from '../utils'
 import ShowJson from '../drawer/showJson';
+import BatchModify from './modify';
 
 const useStyles = createStyles(({ token, css }) => {
     return {
     }
 })
 
-const waitTime = (time = 100) => {
-    return new Promise((resolve) => {
-        setTimeout(() => {
-            resolve(true);
-        }, time);
-    });
-};
-
 const BatchDrawer = (props) => {
     const intl = useIntl();
     const { styles } = useStyles();
-    const { batchSprites } = props;
-    const [form] = Form.useForm();
-    const [currentStep, setCurrentStep] = useState(0);
-
-    const resetForm = () => {
-        form.resetFields();
-        setCurrentStep(0);
-    };
+    const {
+        batchSprites,
+        model,
+        ModelEnum,
+    } = props;
 
     useEffect(() => {
-        console.log(batchSprites);
-        resetForm();
     }, [props]);
-
-    useEffect(() => {
-        console.log(currentStep);
-    }, [currentStep]);
 
     const handleCancel = () => {
         props.onCancel();
@@ -63,6 +36,7 @@
                 rootStyle={{ position: "absolute" }}
                 mask={false}
                 width={600}
+                placement={'left'}
                 style={{
                     opacity: 1
                 }}
@@ -83,179 +57,27 @@
                         height: '100%'
                     }}
                 >
-                    <StepsForm
-                        form={form}
-                        current={currentStep}
-                        onCurrentChange={setCurrentStep}
-                        onFinish={async () => {
-                            await waitTime(1000);
-                            message.success('鎻愪氦鎴愬姛');
-                        }}
-                        formProps={{
-                            validateMessages: {
-                                required: '姝ら」涓哄繀濉」',
-                            },
-                            variant: 'filled',
-                            layout: 'horizontal',
-                            labelCol: {
-                                span: 4,
-                            },
-                            wrapperCol: {
-                                span: 20,
-                            },
-                            labelWrap: true
-                        }}
-                        submitter={{
-                            render: (props, dom) => {
-                                return props.step === 2 ? [] : dom;
-                            },
-                        }}
-                    >
-                        {/************************* first ****************************/}
-                        <StepsForm.StepForm
-                            name="base"
-                            title="閫夋嫨璐ф灦"
-                            onFinish={() => {
-                                return true;
-                            }}
-                        >
-                            <ProForm.Item
-                            >
-                                <ShowJson
-                                    data={
-                                        batchSprites?.filter(item => {
-                                            return item.data?.type === Utils.SENSOR_TYPE.SHELF
-                                        }).map(item => {
-                                            return item.data?.no;
-                                        })
-                                    }
-                                    height='500px'
-                                    jsonType={0}
-                                />
-                            </ProForm.Item>
-                        </StepsForm.StepForm>
-                        {/************************* second ****************************/}
-                        <StepsForm.StepForm
-                            name="checkbox"
-                            title="璁剧疆鍙傛暟"
-                            onFinish={(values) => {
-                                console.log(values);
-                                return true;
-                            }}
-                        >
-                            <ProForm.Item
-                                name='shelfType'
-                                label={intl.formatMessage({ id: 'map.settings.shelf.type', defaultMessage: '绫诲瀷' })}
-                                rules={[
-                                    {
-                                        required: true,
-                                    },
-                                ]}
-                            >
-                                <Select
-                                    style={{ width: 120 }}
-                                    options={[
-                                        {
-                                            label: intl.formatMessage({ id: 'map.settings.shelf.store', defaultMessage: '搴撲綅' }),
-                                            value: 0
-                                        },
-                                        {
-                                            label: intl.formatMessage({ id: 'map.settings.shelf.track', defaultMessage: '杞ㄩ亾' }),
-                                            value: 3
-                                        },
-                                        {
-                                            label: intl.formatMessage({ id: 'map.settings.shelf.diable', defaultMessage: '绂佺敤' }),
-                                            value: 1
-                                        },
-                                    ]}
-                                    defaultValue={0}
-                                />
-                            </ProForm.Item>
-                            <ProForm.Item
-                                label={intl.formatMessage({ id: 'map.settings.shelf.space', defaultMessage: '闂磋窛' })}
-                            >
-                                <Space.Compact>
-                                    <ProForm.Item
-                                        name='top'
-                                        noStyle
-                                    >
-                                        <InputNumber
-                                            addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.top' defaultMessage='涓�' /></Space.Compact>}
-                                            style={{
-                                                width: '50%',
-                                            }}
-                                        />
-                                    </ProForm.Item>
-                                    <ProForm.Item
-                                        name='bottom'
-                                        noStyle
-                                    >
-                                        <InputNumber
-                                            addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.bottom' defaultMessage='涓�' /></Space.Compact>}
-                                            style={{
-                                                width: '50%',
-                                            }}
-                                        />
-                                    </ProForm.Item>
-                                </Space.Compact>
-                            </ProForm.Item>
-                            <ProForm.Item
-                                label={' '}
-                            >
-                                <Space.Compact>
-                                    <ProForm.Item
-                                        name='left'
-                                        noStyle
-                                    >
-                                        <InputNumber
-                                            addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.left' defaultMessage='宸�' /></Space.Compact>}
-                                            style={{
-                                                width: '50%',
-                                            }}
-                                        />
-                                    </ProForm.Item>
-                                    <ProForm.Item
-                                        name='right'
-                                        noStyle
-                                    >
-                                        <InputNumber
-                                            addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.right' defaultMessage='鍙�' /></Space.Compact>}
-                                            style={{
-                                                width: '50%',
-                                            }}
-                                        />
-                                    </ProForm.Item>
-                                </Space.Compact>
-                            </ProForm.Item>
-                            <ProForm.Item
-                                name='value'
-                                label={intl.formatMessage({ id: 'map.settings.shelf.value', defaultMessage: '鍦板浘鍊�' })}
-                            >
-                                <Input
-                                    style={{
-                                        width: '50%',
-                                    }}
-                                />
-                            </ProForm.Item>
-                        </StepsForm.StepForm>
-                        {/************************* third ****************************/}
-                        <StepsForm.StepForm
-                            name="time"
-                            title="缁撴灉"
-                            submitter={false}
-                        >
-                            <Result
-                                status="success"
-                                title="Successfully Purchased Cloud Server ECS!"
-                                subTitle="Order number: 2017182818828182881 Cloud server configuration takes 1-5 minutes, please wait."
-                                extra={[
-                                    <Button type="primary" key="console">
-                                        Go Console
-                                    </Button>,
-                                ]}
+                    {model === ModelEnum.OBSERVER_MODEL && (
+                        <>
+                            <ShowJson
+                                data={
+                                    batchSprites?.map(item => {
+                                        return item.data?.no;
+                                    })
+                                }
                             />
-                        </StepsForm.StepForm>
-                    </StepsForm >
+                        </>
+                    )}
+
+                    {model === ModelEnum.SETTINGS_MODEL && (
+                        <>
+                            <BatchModify
+                                batchSprites={batchSprites}
+                                handleCancel={handleCancel}
+                            />
+                        </>
+                    )}
+
                 </Card >
             </Drawer >
         </>
diff --git a/zy-asrs-flow/src/pages/map/batch/modify.jsx b/zy-asrs-flow/src/pages/map/batch/modify.jsx
new file mode 100644
index 0000000..5b0347f
--- /dev/null
+++ b/zy-asrs-flow/src/pages/map/batch/modify.jsx
@@ -0,0 +1,223 @@
+import React, { useState, useRef, useEffect } from 'react';
+import { Drawer, Space, Button, Card, Select, InputNumber, Input, Result, Form } from 'antd';
+import {
+    ProForm,
+    StepsForm,
+} from '@ant-design/pro-components';
+import { FormattedMessage, useIntl, useModel } from '@umijs/max';
+import { createStyles } from 'antd-style';
+import * as Utils from '../utils'
+import ShowJson from '../drawer/showJson';
+
+const waitTime = (time = 100) => {
+    return new Promise((resolve) => {
+        setTimeout(() => {
+            resolve(true);
+        }, time);
+    });
+};
+
+const useStyles = createStyles(({ token, css }) => {
+    return {
+    }
+})
+
+const BatchModify = (props) => {
+    const intl = useIntl();
+    const { styles } = useStyles();
+    const { batchSprites } = props;
+
+    const [form] = Form.useForm();
+    const [currentStep, setCurrentStep] = useState(0);
+
+    const resetForm = () => {
+        form.resetFields();
+        setCurrentStep(0);
+    };
+
+    useEffect(() => {
+        console.log(batchSprites);
+        resetForm();
+    }, [props]);
+
+    useEffect(() => {
+        console.log(currentStep);
+    }, [currentStep]);
+
+    return (
+        <>
+            <StepsForm
+                form={form}
+                current={currentStep}
+                onCurrentChange={setCurrentStep}
+                onFinish={async () => {
+                    await waitTime(1000);
+                    message.success('鎻愪氦鎴愬姛');
+                }}
+                formProps={{
+                    variant: 'filled',
+                    layout: 'horizontal',
+                    labelCol: {
+                        span: 4,
+                    },
+                    wrapperCol: {
+                        span: 20,
+                    },
+                    labelWrap: true
+                }}
+                submitter={{
+                    render: (props, dom) => {
+                        return props.step === 2 ? [] : dom;
+                    },
+                }}
+            >
+                {/************************* first ****************************/}
+                <StepsForm.StepForm
+                    name="base"
+                    title={intl.formatMessage({ id: 'map.settings.batch.select.shelf', defaultMessage: '閫夋嫨璐ф灦' })}
+                    onFinish={() => {
+                        return true;
+                    }}
+                >
+                    <ProForm.Item
+                    >
+                        <ShowJson
+                            data={
+                                batchSprites?.filter(item => {
+                                    return item.data?.type === Utils.SENSOR_TYPE.SHELF
+                                }).map(item => {
+                                    return item.data?.no;
+                                })
+                            }
+                            height='500px'
+                            jsonType={0}
+                        />
+                    </ProForm.Item>
+                </StepsForm.StepForm>
+                {/************************* second ****************************/}
+                <StepsForm.StepForm
+                    name="checkbox"
+                    title={intl.formatMessage({ id: 'map.settings.batch.set.params', defaultMessage: '璁剧疆鍙傛暟' })}
+                    onFinish={(values) => {
+                        console.log(values);
+                        return true;
+                    }}
+                >
+                    <ProForm.Item
+                        name='shelfType'
+                        label={intl.formatMessage({ id: 'map.settings.shelf.type', defaultMessage: '绫诲瀷' })}
+                        rules={[
+                            {
+                                required: true,
+                            },
+                        ]}
+                    >
+                        <Select
+                            style={{ width: 120 }}
+                            options={[
+                                {
+                                    label: intl.formatMessage({ id: 'map.settings.shelf.store', defaultMessage: '搴撲綅' }),
+                                    value: 0
+                                },
+                                {
+                                    label: intl.formatMessage({ id: 'map.settings.shelf.track', defaultMessage: '杞ㄩ亾' }),
+                                    value: 3
+                                },
+                                {
+                                    label: intl.formatMessage({ id: 'map.settings.shelf.diable', defaultMessage: '绂佺敤' }),
+                                    value: 1
+                                },
+                            ]}
+                            defaultValue={0}
+                        />
+                    </ProForm.Item>
+                    <ProForm.Item
+                        label={intl.formatMessage({ id: 'map.settings.shelf.space', defaultMessage: '闂磋窛' })}
+                    >
+                        <Space.Compact>
+                            <ProForm.Item
+                                name='top'
+                                noStyle
+                            >
+                                <InputNumber
+                                    addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.top' defaultMessage='涓�' /></Space.Compact>}
+                                    style={{
+                                        width: '50%',
+                                    }}
+                                />
+                            </ProForm.Item>
+                            <ProForm.Item
+                                name='bottom'
+                                noStyle
+                            >
+                                <InputNumber
+                                    addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.bottom' defaultMessage='涓�' /></Space.Compact>}
+                                    style={{
+                                        width: '50%',
+                                    }}
+                                />
+                            </ProForm.Item>
+                        </Space.Compact>
+                    </ProForm.Item>
+                    <ProForm.Item
+                        label={' '}
+                    >
+                        <Space.Compact>
+                            <ProForm.Item
+                                name='left'
+                                noStyle
+                            >
+                                <InputNumber
+                                    addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.left' defaultMessage='宸�' /></Space.Compact>}
+                                    style={{
+                                        width: '50%',
+                                    }}
+                                />
+                            </ProForm.Item>
+                            <ProForm.Item
+                                name='right'
+                                noStyle
+                            >
+                                <InputNumber
+                                    addonBefore={<Space.Compact><FormattedMessage id='map.settings.shelf.right' defaultMessage='鍙�' /></Space.Compact>}
+                                    style={{
+                                        width: '50%',
+                                    }}
+                                />
+                            </ProForm.Item>
+                        </Space.Compact>
+                    </ProForm.Item>
+                    <ProForm.Item
+                        name='value'
+                        label={intl.formatMessage({ id: 'map.settings.shelf.value', defaultMessage: '鍦板浘鍊�' })}
+                    >
+                        <Input
+                            style={{
+                                width: '50%',
+                            }}
+                        />
+                    </ProForm.Item>
+                </StepsForm.StepForm>
+                {/************************* third ****************************/}
+                <StepsForm.StepForm
+                    name="time"
+                    title={intl.formatMessage({ id: 'map.settings.batch.result', defaultMessage: '缁撴灉' })}
+                    submitter={false}
+                >
+                    <Result
+                        status="success"
+                        title={intl.formatMessage({ id: 'map.settings.batch.result.title', defaultMessage: '鎵归噺璁剧疆鎴愬姛' })}
+                        subTitle=""
+                        extra={[
+                            <Button type="primary" key="console" onClick={props.handleCancel}>
+                                <FormattedMessage id='common.confirm' defaultMessage='纭畾' />
+                            </Button>,
+                        ]}
+                    />
+                </StepsForm.StepForm>
+            </StepsForm >
+        </>
+    )
+}
+
+export default BatchModify;
\ No newline at end of file
diff --git a/zy-asrs-flow/src/pages/map/components/configSettings.jsx b/zy-asrs-flow/src/pages/map/components/configSettings.jsx
index 9bd8aaa..306abd3 100644
--- a/zy-asrs-flow/src/pages/map/components/configSettings.jsx
+++ b/zy-asrs-flow/src/pages/map/components/configSettings.jsx
@@ -94,7 +94,8 @@
         // execute where the form was finished
         const confirmSettings = () => {
             if (curSprite && curSprite?.data?.type) {
-                curSprite.data = { ...curSprite.data, ...values }
+                curSprite.data = { ...curSprite.data, ...values };
+                Utils.showSheflType(curSprite);
             }
             message.success(intl.formatMessage({ id: 'common.success', defaultMessage: '鎿嶄綔鎴愬姛' }));
         }
@@ -200,15 +201,15 @@
                                 options={[
                                     {
                                         label: intl.formatMessage({ id: 'map.settings.shelf.store', defaultMessage: '搴撲綅' }),
-                                        value: 0
+                                        value: Utils.SHELF_TYPE.STORE
                                     },
                                     {
                                         label: intl.formatMessage({ id: 'map.settings.shelf.track', defaultMessage: '杞ㄩ亾' }),
-                                        value: 3
+                                        value: Utils.SHELF_TYPE.TRACK
                                     },
                                     {
                                         label: intl.formatMessage({ id: 'map.settings.shelf.diable', defaultMessage: '绂佺敤' }),
-                                        value: 1
+                                        value: Utils.SHELF_TYPE.DISABLE
                                     },
                                 ]}
                                 defaultValue={0}
diff --git a/zy-asrs-flow/src/pages/map/header/search.jsx b/zy-asrs-flow/src/pages/map/header/search.jsx
index 5c70fe6..175c0bb 100644
--- a/zy-asrs-flow/src/pages/map/header/search.jsx
+++ b/zy-asrs-flow/src/pages/map/header/search.jsx
@@ -117,7 +117,10 @@
                 break;
             case ModelEnum.MOVABLE_MODEL:
                 setModel(ModelEnum.SETTINGS_MODEL);
-                setSpriteBySettings(selectSensor);
+                // avoid model modify which will clear spriteBySettings
+                setTimeout(() => {
+                    setSpriteBySettings(selectSensor);
+                }, 300)
                 break;
             case ModelEnum.SETTINGS_MODEL:
                 setSpriteBySettings(selectSensor);
diff --git a/zy-asrs-flow/src/pages/map/index.jsx b/zy-asrs-flow/src/pages/map/index.jsx
index a0745fd..8ed7dd8 100644
--- a/zy-asrs-flow/src/pages/map/index.jsx
+++ b/zy-asrs-flow/src/pages/map/index.jsx
@@ -87,7 +87,10 @@
     const prevCurSpriteRef = React.useRef();
     const hasFloor = true;
     // const [hasFloor, setHasFloor] = React.useState(true);
-    const [curFloor, setCurFloor] = React.useState(1);
+    const [curFloor, setCurFloor] = React.useState(() => {
+        const storedValue = localStorage.getItem('curFloor');
+        return storedValue !== null ? JSON.parse(storedValue) : 1;
+    });
     const [batchSprites, setBatchSprites] = React.useState([]);
     const [batchDrawerVisible, setBatchDrawerVisible] = React.useState(false);
 
@@ -141,6 +144,8 @@
         setDrawerVisible(false);
         setSpriteBySettings(null);
         setSettingsVisible(false);
+        setBatchSprites([]);
+        setBatchDrawerVisible(false);
 
         switch (model) {
             case MapModel.OBSERVER_MODEL:
@@ -244,6 +249,7 @@
             return;
         }
         switchFloor(curFloor);
+        localStorage.setItem('curFloor', JSON.stringify(curFloor));
     }, [curFloor]);
 
     // watch spriteBySettings
@@ -264,10 +270,15 @@
     }, [spriteBySettings])
     const prevSpriteBySettings = prevSpriteBySettingsRef.current;
 
+    // watch batchSprites
     React.useEffect(() => {
+        if (!mapContainer) {
+            return;
+        }
         if (batchSprites?.length > 0) {
             setBatchDrawerVisible(true)
         } else {
+            player.clearSelectedSprites();
             setBatchDrawerVisible(false)
         }
     }, [batchSprites])
@@ -427,8 +438,10 @@
                 open={batchDrawerVisible}
                 batchSprites={batchSprites}
                 refCurr={mapRef.current}
+                model={model}
+                ModelEnum={MapModel}
                 onCancel={() => {
-                    setBatchSprites(null);
+                    setBatchSprites([]);
                     setBatchDrawerVisible(false);
                 }}
             />
diff --git a/zy-asrs-flow/src/pages/map/player.js b/zy-asrs-flow/src/pages/map/player.js
index 17eb4df..bf9bf19 100644
--- a/zy-asrs-flow/src/pages/map/player.js
+++ b/zy-asrs-flow/src/pages/map/player.js
@@ -27,11 +27,11 @@
         if (this.mapEvent) {
             this.mapContainer.parent.off('mousedown');
             this.mapEvent = null;
-            if (this.selectedSprites && this.selectedSprites.length > 0) {
-                this.selectedSprites.forEach(child => {
-                    Utils.unMarkSprite(child);
-                })
-            }
+            // if (this.selectedSprites && this.selectedSprites.length > 0) {
+            //     this.selectedSprites.forEach(child => {
+            //         Utils.unMarkSprite(child);
+            //     })
+            // }
         }
         this.mapEvent = (event) => {
             if (eventType && event.button === 0) {
@@ -95,12 +95,7 @@
 
         this.mapContainer.parent.on('mouseup', (event) => {
             if (isSelecting) {
-                if (this.selectedSprites && this.selectedSprites.length > 0) {
-                    this.selectedSprites.forEach(child => {
-                        Utils.unMarkSprite(child);
-                    })
-                }
-                this.selectedSprites = [];
+                this.clearSelectedSprites();
 
                 // sprite show style which be selected
                 this.mapContainer.children.forEach(child => {
@@ -127,6 +122,15 @@
         });
     }
 
+    clearSelectedSprites = () => {
+        if (this.selectedSprites && this.selectedSprites.length > 0) {
+            this.selectedSprites.forEach(child => {
+                Utils.unMarkSprite(child);
+            })
+        }
+        this.selectedSprites = [];
+    }
+
     activateMapPan = () => {
         const mapPanHandle = (event) => {
             if (event.button === 2) {
diff --git a/zy-asrs-flow/src/pages/map/utils.js b/zy-asrs-flow/src/pages/map/utils.js
index 6865dbc..b45a4cf 100644
--- a/zy-asrs-flow/src/pages/map/utils.js
+++ b/zy-asrs-flow/src/pages/map/utils.js
@@ -38,6 +38,12 @@
     AGV: "AGV",
 })
 
+export const SHELF_TYPE = Object.freeze({
+    STORE: 0,
+    TRACK: 3,
+    DISABLE: 1,
+})
+
 export const getRealPosition = (x, y, mapContainer) => {
     const rect = app.view.getBoundingClientRect();
     return {
@@ -253,6 +259,7 @@
     copiedSprite.rotation = sprite.rotation;
     copiedSprite.data = deepCopy(sprite.data);
     copiedSprite.data.uuid = generateID();
+    showSheflType(copiedSprite);
     return copiedSprite;
 }
 
@@ -356,10 +363,13 @@
                 // dynamical data
                 Object.assign(sprite.data, item.property);
 
+                showSheflType(sprite);
                 // graph
                 sprite.position.set(item.positionX, item.positionY);
                 sprite.scale.set(item.scaleX, item.scaleY);
                 sprite.rotation = rotationParseNum(item.rotation);
+
+                // sprite.tint = '#000';
                 mapContainer.addChild(sprite);
             }
         })
@@ -462,4 +472,24 @@
         closeIcon: false,
         onClick: () => { }
     });
+}
+
+export const showSheflType = (sprite) => {
+    let showColor;
+    switch (sprite.data.shelfType) {
+        case SHELF_TYPE.STORE:
+            break;
+        case SHELF_TYPE.TRACK:
+            showColor = '#faf6e9';
+            break;
+        case SHELF_TYPE.DISABLE:
+            showColor = '#ffc8c8';
+            break;
+        default:
+            break;
+    }
+    if (showColor) {
+        sprite.tint = showColor;
+    }
+    return showColor;
 }
\ No newline at end of file
diff --git a/zy-asrs-wcs/src/main/resources/application.yml b/zy-asrs-wcs/src/main/resources/application.yml
index 5835558..73fc1d7 100644
--- a/zy-asrs-wcs/src/main/resources/application.yml
+++ b/zy-asrs-wcs/src/main/resources/application.yml
@@ -2,6 +2,8 @@
   port: 9090
   servlet:
     context-path: /@pom.build.finalName@
+  tomcat:
+    max-connections: 30000
 
 spring:
   application:
@@ -13,7 +15,7 @@
       validation-timeout: 3000
       connection-test-query: select 1
     driver-class-name: com.mysql.cj.jdbc.Driver
-#    url: jdbc:mysql://47.97.1.152:3306/asrs?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+#    url: jdbc:mysql://47.97.1.152:3306/asrs?useUnicode=trKue&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
 #    username: root
 #    password: zy@123
     url: jdbc:mysql://192.168.4.15:3306/asrs?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai

--
Gitblit v1.9.1