| | |
| | | |
| | | alter table sys_user_login |
| | | change system system_name varchar(255) null comment '登录系统'; |
| | | |
| | | ALTER TABLE `man_agv_model` |
| | | ADD COLUMN `angle_offset_deg` decimal(24,9) NOT NULL DEFAULT '0.000000000' COMMENT '角度偏移量' AFTER `work_direction`; |
| | | |
| | | ALTER TABLE `man_agv_model` |
| | | ADD COLUMN `angle_clockwise` int(1) NOT NULL DEFAULT '1' COMMENT '时钟方向{1:顺时针,0:逆时针}' AFTER `angle_offset_deg`; |
| | | |
| New file |
| | |
| | | package com.zy.acs.common.enums; |
| | | |
| | | public enum ClockwiseType { |
| | | |
| | | CW(1), |
| | | CCW(0), |
| | | ; |
| | | |
| | | public final int value; |
| | | |
| | | ClockwiseType(int value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | } |
| | |
| | | quaBattery: "work battery", |
| | | travelSpeed: "travel speed", |
| | | workDirection: "work direction", |
| | | angleOffsetDeg: "angle offset", |
| | | angleClockwise: "clockwise direction", |
| | | allDirection: "all direction", |
| | | protocol: "protocol", |
| | | mqttTopic: "mqtt topic", |
| | |
| | | quaBattery: "额定电量", |
| | | travelSpeed: "走行速度", |
| | | workDirection: "作业方向", |
| | | angleOffsetDeg: "角度偏移量", |
| | | angleClockwise: "时钟方向", |
| | | allDirection: "全向", |
| | | protocol: "协议", |
| | | mqttTopic: "mqtt", |
| | |
| | | <DetailValue value={record.agvModelData.workDirection} /> |
| | | </Grid> |
| | | <Grid item xs={ITEM_COL}> |
| | | <DetailTitle title='table.field.agvModel.angleOffsetDeg' /> |
| | | <DetailValue value={record.agvModelData.angleOffsetDeg} /> |
| | | </Grid> |
| | | <Grid item xs={ITEM_COL}> |
| | | <DetailTitle title='table.field.agvModel.angleClockwise' /> |
| | | <DetailValue value={record.agvModelData.angleClockwise === 1 ? translate('page.code.enums.spin.cw') : translate('page.code.enums.spin.ccw')} /> |
| | | </Grid> |
| | | <Grid item xs={ITEM_COL}> |
| | | <DetailTitle title='table.field.agvModel.allDirection' /> |
| | | <DetailValue value={record.agvModelData.allDirection === 1 ? translate('common.enums.true') : translate('common.enums.false')} /> |
| | | </Grid> |
| | |
| | | return ( |
| | | <> |
| | | <CreateBase |
| | | record={{}} |
| | | record={{ angleOffsetDeg: 0, angleClockwise: 1 }} |
| | | transform={(data) => { |
| | | return data; |
| | | }} |
| | |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.agvModel.angleOffsetDeg" |
| | | source="angleOffsetDeg" |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <SelectInput |
| | | label="table.field.agvModel.angleClockwise" |
| | | source="angleClockwise" |
| | | choices={[ |
| | | { id: 1, name: 'page.code.enums.spin.cw' }, |
| | | { id: 0, name: 'page.code.enums.spin.ccw' }, |
| | | ]} |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <SelectInput |
| | | label="table.field.agvModel.allDirection" |
| | | source="allDirection" |
| | |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.agvModel.angleOffsetDeg" |
| | | source="angleOffsetDeg" |
| | | validate={required()} |
| | | /> |
| | | <SelectInput |
| | | label="table.field.agvModel.angleClockwise" |
| | | source="angleClockwise" |
| | | choices={[ |
| | | { id: 1, name: 'page.code.enums.spin.cw' }, |
| | | { id: 0, name: 'page.code.enums.spin.ccw' }, |
| | | ]} |
| | | validate={required()} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.agvModel.protocol" |
| | | source="protocol" |
| | |
| | | ReferenceArrayInput, |
| | | AutocompleteInput, |
| | | DeleteButton, |
| | | FunctionField, |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | |
| | | import MyCreateButton from "../components/MyCreateButton"; |
| | | import MyExportButton from '../components/MyExportButton'; |
| | | import PageDrawer from "../components/PageDrawer"; |
| | | import MyField from "../components/MyField"; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import * as Common from '@/utils/common'; |
| | | |
| | |
| | | <NumberInput source="quaBattery" label="table.field.agvModel.quaBattery" />, |
| | | <NumberInput source="travelSpeed" label="table.field.agvModel.travelSpeed" />, |
| | | <NumberInput source="workDirection" label="table.field.agvModel.workDirection" />, |
| | | <NumberInput source="angleOffsetDeg" label="table.field.agvModel.angleOffsetDeg" />, |
| | | <SelectInput source="angleClockwise" label="table.field.agvModel.angleClockwise" |
| | | choices={[ |
| | | { id: 1, name: 'page.code.enums.spin.cw' }, |
| | | { id: 0, name: 'page.code.enums.spin.ccw' }, |
| | | ]} |
| | | />, |
| | | <SelectInput source="allDirection" label="table.field.agvModel.allDirection" |
| | | choices={[ |
| | | { id: 0, name: 'common.enums.true' }, |
| | |
| | | rowClick={(id, resource, record) => false} |
| | | expand={() => <AgvModelPanel />} |
| | | expandSingle={true} |
| | | omit={['id', 'uuid', 'liftHeight', 'mqttTopic', 'password', 'protocol' |
| | | omit={['id', 'uuid', 'type', 'liftHeight', 'mqttTopic', 'password', 'protocol' |
| | | // , 'headOffset', 'tailOffset', 'width' |
| | | , 'length', 'height', 'allDirectionBool', 'diameter' |
| | | , 'length', 'height', 'allDirectionBool', 'diameter', 'travelSpeed' |
| | | , 'statusBool', 'updateBy', 'updateTime', 'createTime', 'createBy', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | |
| | | <NumberField source="quaBattery" label="table.field.agvModel.quaBattery" /> |
| | | <NumberField source="travelSpeed" label="table.field.agvModel.travelSpeed" /> |
| | | <NumberField source="workDirection" label="table.field.agvModel.workDirection" /> |
| | | <NumberField source="angleOffsetDeg" label="table.field.agvModel.angleOffsetDeg" /> |
| | | <FunctionField |
| | | label="table.field.agvModel.angleClockwise" |
| | | render={(record) => translate(record.angleClockwise === 1 ? 'page.code.enums.spin.cw' : 'page.code.enums.spin.ccw')} |
| | | /> |
| | | <BooleanField source="allDirectionBool" label="table.field.agvModel.allDirection" sortable={false} /> |
| | | <TextField source="protocol" label="table.field.agvModel.protocol" /> |
| | | <TextField source="mqttTopic" label="table.field.agvModel.mqttTopic" /> |
| | |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.agvModel.angleOffsetDeg" |
| | | property={record.angleOffsetDeg} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.agvModel.angleClockwise" |
| | | property={record.angleClockwise === 1 ? translate('page.code.enums.spin.cw') : translate('page.code.enums.spin.ccw')} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.agvModel.allDirection" |
| | | property={record.allDirection ? translate('common.enums.true') : translate('common.enums.false')} |
| | | /> |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.zy.acs.common.enums.ClockwiseType; |
| | | import com.zy.acs.framework.common.Cools; |
| | | import com.zy.acs.framework.common.R; |
| | | import com.zy.acs.framework.common.SnowflakeIdWorker; |
| | |
| | | Date now = new Date(); |
| | | agvModel.setUuid(String.valueOf(snowflakeIdWorker.nextId()).substring(3)); |
| | | agvModel.setStatus(StatusType.ENABLE.val); |
| | | if (agvModel.getAngleOffsetDeg() == null) { |
| | | agvModel.setAngleOffsetDeg(0D); |
| | | } |
| | | if (agvModel.getAngleClockwise() == null) { |
| | | agvModel.setAngleClockwise(ClockwiseType.CW.value); |
| | | } |
| | | agvModel.setCreateBy(getLoginUserId()); |
| | | agvModel.setCreateTime(now); |
| | | agvModel.setUpdateBy(getLoginUserId()); |
| | |
| | | private Double workDirection; |
| | | |
| | | /** |
| | | * 角度偏移量 |
| | | */ |
| | | @ApiModelProperty(value= "角度偏移量") |
| | | private Double angleOffsetDeg; |
| | | |
| | | /** |
| | | * 时钟方向 {1:顺时针,0:逆时针} |
| | | */ |
| | | @ApiModelProperty(value= "时钟方向") |
| | | private Integer angleClockwise; |
| | | |
| | | /** |
| | | * 全向 0: 否 1: 是 |
| | | */ |
| | | @ApiModelProperty(value= "全向 0: 否 1: 是 ") |