#
vincentlu
昨天 0e34b445bdf4cae20a75ac2ace622718e97e8025
#
1个文件已添加
9个文件已修改
75 ■■■■ 已修改文件
version/db/new.sql 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/i18n/en.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/i18n/zh.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/page/loc/LocCreate.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/page/loc/LocEdit.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/page/loc/LocInit.jsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/page/loc/LocList.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/page/loc/LocPanel.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/page/loc/compDirect.js 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MapService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
version/db/new.sql
@@ -59,4 +59,7 @@
    PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
update man_loc set comp_direct =2  where comp_direct =0
update man_loc set comp_direct =2  where comp_direct =0
alter table man_sta
    add act_dir int(1) null comment '作业方向' after angle;
zy-acs-flow/src/i18n/en.js
@@ -687,6 +687,13 @@
            },
            levOffset: 'lev offset',
            bottomOffset: 'bottom offset',
            enums: {
                compDirect: {
                    left: 'Left',
                    right: 'Right',
                    forward: 'Forward',
                },
            },
        },
        sta: {
            depthHint: 'Set depth to 0 to keep the default value.',
zy-acs-flow/src/i18n/zh.js
@@ -687,6 +687,13 @@
            },
            levOffset: '每层高度',
            bottomOffset: '底部偏移量',
            enums: {
                compDirect: {
                    left: '左',
                    right: '右',
                    forward: '前',
                },
            },
        },
        sta: {
            depthHint: '深度设置为 0 表示沿用默认值。',
zy-acs-flow/src/page/loc/LocCreate.jsx
@@ -30,6 +30,7 @@
import DialogCloseButton from "../components/DialogCloseButton";
import StatusSelectInput from "../components/StatusSelectInput";
import MemoInput from "../components/MemoInput";
import { compDirectChoices } from "./compDirect";
const LocCreate = (props) => {
    const { open, setOpen } = props;
@@ -156,10 +157,7 @@
                                    <SelectInput
                                        label="table.field.loc.compDirect"
                                        source="compDirect"
                                        choices={[
                                            { id: 1, name: '大于' },
                                            { id: 0, name: '小于' },
                                        ]}
                                        choices={compDirectChoices}
                                    />
                                </Grid>
                                <Grid item xs={6} display="flex" gap={1}>
zy-acs-flow/src/page/loc/LocEdit.jsx
@@ -28,6 +28,7 @@
import CustomerTopToolBar from "../components/EditTopToolBar";
import MemoInput from "../components/MemoInput";
import StatusSelectInput from "../components/StatusSelectInput";
import { compDirectChoices } from "./compDirect";
const FormToolbar = () => {
    const { getValues } = useFormContext();
@@ -133,10 +134,7 @@
                            <SelectInput
                                label="table.field.loc.compDirect"
                                source="compDirect"
                                choices={[
                                    { id: 1, name: '大于' },
                                    { id: 0, name: '小于' },
                                ]}
                                choices={compDirectChoices}
                            />
                        </Stack>
                        <Stack direction='row' gap={2}>
zy-acs-flow/src/page/loc/LocInit.jsx
@@ -28,6 +28,7 @@
import DialogCloseButton from "../components/DialogCloseButton";
import CheckIcon from '@mui/icons-material/Check';
import request from '@/utils/request'
import { compDirectChoices } from "./compDirect";
const LocInit = (props) => {
    const { open, setOpen } = props;
@@ -166,10 +167,7 @@
                                <SelectInput
                                    label="table.field.loc.compDirect"
                                    source="compDirect"
                                    choices={[
                                        { id: 1, name: '大于' },
                                        { id: 0, name: '小于' },
                                    ]}
                                    choices={compDirectChoices}
                                />
                            </Grid>
                            <Grid item xs={6} display="flex" gap={1}>
@@ -197,4 +195,4 @@
    )
}
export default LocInit;
export default LocInit;
zy-acs-flow/src/page/loc/LocList.jsx
@@ -32,6 +32,7 @@
    DeleteButton,
    Button,
    Pagination,
    FunctionField,
} from 'react-admin';
import { Box, Typography, Card, Stack } from '@mui/material';
import { styled } from '@mui/material/styles';
@@ -49,6 +50,7 @@
import rowSx from "./rowSx";
import BulkUpdateButton from "../components/BulkUpdateButton";
import LocBulkUpdateContent from './LocBulkUpdateContent';
import { getCompDirectLabel } from './compDirect';
const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
    '& .css-1vooibu-MuiSvgIcon-root': {
@@ -170,7 +172,11 @@
                    <ReferenceField source="code" label="table.field.loc.code" reference="code" link={false} sortable={false}>
                        <TextField source="data" />
                    </ReferenceField>
                    {/* <TextField source="compDirect$" label="table.field.loc.compDirect" sortable={false} /> */}
                    <FunctionField
                        label="table.field.loc.compDirect"
                        sortable={false}
                        render={(record) => getCompDirectLabel(translate, record?.compDirect)}
                    />
                    <ReferenceField source="locSts" label="table.field.loc.locSts" reference="locSts" link={false} sortable={true}>
                        <TextField source="name" />
                    </ReferenceField>
zy-acs-flow/src/page/loc/LocPanel.jsx
@@ -6,6 +6,7 @@
} from 'react-admin';
import PanelTypography from "../components/PanelTypography";
import * as Common from '@/utils/common'
import { getCompDirectLabel } from "./compDirect";
const LocPanel = () => {
    const record = useRecordContext();
@@ -73,7 +74,7 @@
                        <Grid item xs={6}>
                            <PanelTypography
                                title="table.field.loc.compDirect" 
                                property={record.compDirect$}
                                property={getCompDirectLabel(translate, record.compDirect)}
                            />
                        </Grid>
                        <Grid item xs={6}>
zy-acs-flow/src/page/loc/compDirect.js
New file
@@ -0,0 +1,21 @@
const compDirectMap = {
    1: 'page.loc.enums.compDirect.left',
    2: 'page.loc.enums.compDirect.right',
    3: 'page.loc.enums.compDirect.forward',
};
export const compDirectChoices = [
    { id: 1, name: compDirectMap[1] },
    { id: 2, name: compDirectMap[2] },
    { id: 3, name: compDirectMap[3] },
];
export const getCompDirectLabel = (translate, compDirect, fallback = '-') => {
    const key = compDirectMap[compDirect];
    if (!key) {
        return fallback;
    }
    return typeof translate === 'function'
        ? translate(key, { _: fallback })
        : key;
};
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MapService.java
@@ -158,9 +158,9 @@
        return angle;
    }
    // 坐标货架阈值 todo:luxiaotao
    // 坐标货架阈值
    public AgvDirectionType calculateAgvWorkDirectionByShelf(Loc loc, Code code) {
        Integer compDirect = loc.getCompDirect();
        Integer compDirect = loc.getCompDirect();
        return AgvDirectionType.fromVal(compDirect);
    }