| | |
| | | jam: 'Jam', |
| | | action: 'Action', |
| | | mission: 'Mission', |
| | | staReserve: 'Sta Reserve', |
| | | }, |
| | | table: { |
| | | field: { |
| | |
| | | priority: "priority", |
| | | version: "version", |
| | | }, |
| | | staReserve: { |
| | | uuid: "uuid", |
| | | staId: "sta", |
| | | taskId: "task", |
| | | segmentId: "segment", |
| | | agvId: "agv", |
| | | name: "name", |
| | | type: "type", |
| | | qty: "qty", |
| | | state: "state", |
| | | reason: "reason", |
| | | expireTime: "expire time", |
| | | waitingAt: "waiting at", |
| | | confirmedAt: "confirmed at", |
| | | cancelledAt: "cancelled at", |
| | | uniqKey: "unique key", |
| | | }, |
| | | } |
| | | }, |
| | | page: { |
| | |
| | | jam: '避让', |
| | | action: '动作', |
| | | mission: '执行', |
| | | staReserve: '站点预约', |
| | | }, |
| | | table: { |
| | | field: { |
| | |
| | | priority: "优先级", |
| | | version: "版本", |
| | | }, |
| | | staReserve: { |
| | | uuid: "编号", |
| | | staId: "站点", |
| | | taskId: "任务", |
| | | segmentId: "作业", |
| | | agvId: "AGV", |
| | | name: "名称", |
| | | type: "预约类型", |
| | | qty: "预约数量", |
| | | state: "预约状态", |
| | | reason: "原因", |
| | | expireTime: "过期时间", |
| | | waitingAt: "开始等待时间", |
| | | confirmedAt: "确认时间", |
| | | cancelledAt: "取消时间", |
| | | uniqKey: "幂等键", |
| | | }, |
| | | } |
| | | }, |
| | | page: { |
| | |
| | | import jam from './jam'; |
| | | import action from './action'; |
| | | import mission from "./mission"; |
| | | import staReserve from './staReserve'; |
| | | |
| | | const ResourceContent = (node) => { |
| | | switch (node.component) { |
| | |
| | | return action; |
| | | case 'mission': |
| | | return mission; |
| | | case 'staReserve': |
| | | return staReserve; |
| | | default: |
| | | return { |
| | | list: ListGuesser, |
| New file |
| | |
| | | import React, { useState, useRef, useEffect, useMemo } from "react"; |
| | | import { |
| | | CreateBase, |
| | | useTranslate, |
| | | TextInput, |
| | | NumberInput, |
| | | BooleanInput, |
| | | DateInput, |
| | | SaveButton, |
| | | SelectInput, |
| | | ReferenceInput, |
| | | ReferenceArrayInput, |
| | | AutocompleteInput, |
| | | Toolbar, |
| | | required, |
| | | useDataProvider, |
| | | useNotify, |
| | | Form, |
| | | useCreateController, |
| | | } from 'react-admin'; |
| | | import { |
| | | Dialog, |
| | | DialogActions, |
| | | DialogContent, |
| | | DialogTitle, |
| | | Stack, |
| | | Grid, |
| | | Box, |
| | | } from '@mui/material'; |
| | | import DialogCloseButton from "../components/DialogCloseButton"; |
| | | import StatusSelectInput from "../components/StatusSelectInput"; |
| | | import MemoInput from "../components/MemoInput"; |
| | | |
| | | const StaReserveCreate = (props) => { |
| | | const { open, setOpen } = props; |
| | | |
| | | const translate = useTranslate(); |
| | | const notify = useNotify(); |
| | | |
| | | const handleClose = (event, reason) => { |
| | | if (reason !== "backdropClick") { |
| | | setOpen(false); |
| | | } |
| | | }; |
| | | |
| | | const handleSuccess = async (data) => { |
| | | setOpen(false); |
| | | notify('common.response.success'); |
| | | }; |
| | | |
| | | const handleError = async (error) => { |
| | | notify(error.message || 'common.response.fail', { type: 'error', messageArgs: { _: error.message } }); |
| | | }; |
| | | |
| | | return ( |
| | | <> |
| | | <CreateBase |
| | | record={{}} |
| | | transform={(data) => { |
| | | return data; |
| | | }} |
| | | mutationOptions={{ onSuccess: handleSuccess, onError: handleError }} |
| | | > |
| | | <Dialog |
| | | open={open} |
| | | onClose={handleClose} |
| | | aria-labelledby="form-dialog-title" |
| | | fullWidth |
| | | disableRestoreFocus |
| | | maxWidth="md" // 'xs' | 'sm' | 'md' | 'lg' | 'xl' |
| | | > |
| | | <Form> |
| | | <DialogTitle id="form-dialog-title" sx={{ |
| | | position: 'sticky', |
| | | top: 0, |
| | | backgroundColor: 'background.paper', |
| | | zIndex: 1000 |
| | | }} |
| | | > |
| | | {translate('create.title')} |
| | | <Box sx={{ position: 'absolute', top: 8, right: 8, zIndex: 1001 }}> |
| | | <DialogCloseButton onClose={handleClose} /> |
| | | </Box> |
| | | </DialogTitle> |
| | | <DialogContent> |
| | | <Grid container rowSpacing={2} columnSpacing={2}> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.staReserve.uuid" |
| | | source="uuid" |
| | | parse={v => v} |
| | | autoFocus |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <ReferenceInput |
| | | source="staId" |
| | | reference="sta" |
| | | > |
| | | <AutocompleteInput |
| | | label="table.field.staReserve.staId" |
| | | optionText="staNo" |
| | | filterToQuery={(val) => ({ staNo: val })} |
| | | validate={required()} |
| | | /> |
| | | </ReferenceInput> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <ReferenceInput |
| | | source="taskId" |
| | | reference="task" |
| | | > |
| | | <AutocompleteInput |
| | | label="table.field.staReserve.taskId" |
| | | optionText="seqNum" |
| | | filterToQuery={(val) => ({ seqNum: val })} |
| | | validate={required()} |
| | | /> |
| | | </ReferenceInput> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <ReferenceInput |
| | | source="segmentId" |
| | | reference="segment" |
| | | > |
| | | <AutocompleteInput |
| | | label="table.field.staReserve.segmentId" |
| | | optionText="uuid" |
| | | filterToQuery={(val) => ({ uuid: val })} |
| | | /> |
| | | </ReferenceInput> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <ReferenceInput |
| | | source="agvId" |
| | | reference="agv" |
| | | > |
| | | <AutocompleteInput |
| | | label="table.field.staReserve.agvId" |
| | | optionText="uuid" |
| | | filterToQuery={(val) => ({ uuid: val })} |
| | | validate={required()} |
| | | /> |
| | | </ReferenceInput> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.staReserve.name" |
| | | source="name" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.staReserve.type" |
| | | source="type" |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.staReserve.qty" |
| | | source="qty" |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.staReserve.state" |
| | | source="state" |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.staReserve.reason" |
| | | source="reason" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <DateInput |
| | | label="table.field.staReserve.expireTime" |
| | | source="expireTime" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <DateInput |
| | | label="table.field.staReserve.waitingAt" |
| | | source="waitingAt" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <DateInput |
| | | label="table.field.staReserve.confirmedAt" |
| | | source="confirmedAt" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <DateInput |
| | | label="table.field.staReserve.cancelledAt" |
| | | source="cancelledAt" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.staReserve.uniqKey" |
| | | source="uniqKey" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <StatusSelectInput /> |
| | | </Grid> |
| | | <Grid item xs={12} display="flex" gap={1}> |
| | | <Stack direction="column" spacing={1} width={'100%'}> |
| | | <MemoInput /> |
| | | </Stack> |
| | | </Grid> |
| | | </Grid> |
| | | </DialogContent> |
| | | <DialogActions sx={{ position: 'sticky', bottom: 0, backgroundColor: 'background.paper', zIndex: 1000 }}> |
| | | <Toolbar sx={{ width: '100%', justifyContent: 'space-between' }} > |
| | | <SaveButton /> |
| | | </Toolbar> |
| | | </DialogActions> |
| | | </Form> |
| | | </Dialog> |
| | | </CreateBase> |
| | | </> |
| | | ) |
| | | } |
| | | |
| | | export default StaReserveCreate; |
| New file |
| | |
| | | import React, { useState, useRef, useEffect, useMemo } from "react"; |
| | | import { |
| | | Edit, |
| | | SimpleForm, |
| | | FormDataConsumer, |
| | | useTranslate, |
| | | TextInput, |
| | | NumberInput, |
| | | BooleanInput, |
| | | DateInput, |
| | | SelectInput, |
| | | ReferenceInput, |
| | | ReferenceArrayInput, |
| | | AutocompleteInput, |
| | | SaveButton, |
| | | Toolbar, |
| | | Labeled, |
| | | NumberField, |
| | | required, |
| | | useRecordContext, |
| | | DeleteButton, |
| | | } from 'react-admin'; |
| | | import { useWatch, useFormContext } from "react-hook-form"; |
| | | import { Stack, Grid, Box, Typography } from '@mui/material'; |
| | | import * as Common from '@/utils/common'; |
| | | import { EDIT_MODE, REFERENCE_INPUT_PAGESIZE } from '@/config/setting'; |
| | | import EditBaseAside from "../components/EditBaseAside"; |
| | | import CustomerTopToolBar from "../components/EditTopToolBar"; |
| | | import MemoInput from "../components/MemoInput"; |
| | | import StatusSelectInput from "../components/StatusSelectInput"; |
| | | |
| | | const FormToolbar = () => { |
| | | const { getValues } = useFormContext(); |
| | | |
| | | return ( |
| | | <Toolbar sx={{ justifyContent: 'space-between' }}> |
| | | <SaveButton /> |
| | | <DeleteButton mutationMode="optimistic" /> |
| | | </Toolbar> |
| | | ) |
| | | } |
| | | |
| | | const StaReserveEdit = () => { |
| | | const translate = useTranslate(); |
| | | |
| | | return ( |
| | | <Edit |
| | | redirect="list" |
| | | mutationMode={EDIT_MODE} |
| | | actions={<CustomerTopToolBar />} |
| | | aside={<EditBaseAside />} |
| | | > |
| | | <SimpleForm |
| | | shouldUnregister |
| | | warnWhenUnsavedChanges |
| | | toolbar={<FormToolbar />} |
| | | mode="onTouched" |
| | | defaultValues={{}} |
| | | // validate={(values) => { }} |
| | | > |
| | | <Grid container width={{ xs: '100%', xl: '80%' }} rowSpacing={3} columnSpacing={3}> |
| | | <Grid item xs={12} md={8}> |
| | | <Typography variant="h6" gutterBottom> |
| | | {translate('common.edit.title.main')} |
| | | </Typography> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.staReserve.uuid" |
| | | source="uuid" |
| | | parse={v => v} |
| | | autoFocus |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <ReferenceInput |
| | | source="staId" |
| | | reference="sta" |
| | | perPage={REFERENCE_INPUT_PAGESIZE} |
| | | > |
| | | <AutocompleteInput |
| | | label="table.field.staReserve.staId" |
| | | optionText="staNo" |
| | | filterToQuery={(val) => ({ staNo: val })} |
| | | validate={required()} |
| | | /> |
| | | </ReferenceInput> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <ReferenceInput |
| | | source="taskId" |
| | | reference="task" |
| | | perPage={REFERENCE_INPUT_PAGESIZE} |
| | | > |
| | | <AutocompleteInput |
| | | label="table.field.staReserve.taskId" |
| | | optionText="seqNum" |
| | | filterToQuery={(val) => ({ seqNum: val })} |
| | | validate={required()} |
| | | /> |
| | | </ReferenceInput> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <ReferenceInput |
| | | source="segmentId" |
| | | reference="segment" |
| | | perPage={REFERENCE_INPUT_PAGESIZE} |
| | | > |
| | | <AutocompleteInput |
| | | label="table.field.staReserve.segmentId" |
| | | optionText="uuid" |
| | | filterToQuery={(val) => ({ uuid: val })} |
| | | /> |
| | | </ReferenceInput> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <ReferenceInput |
| | | source="agvId" |
| | | reference="agv" |
| | | perPage={REFERENCE_INPUT_PAGESIZE} |
| | | > |
| | | <AutocompleteInput |
| | | label="table.field.staReserve.agvId" |
| | | optionText="uuid" |
| | | filterToQuery={(val) => ({ uuid: val })} |
| | | validate={required()} |
| | | /> |
| | | </ReferenceInput> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.staReserve.name" |
| | | source="name" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.staReserve.type" |
| | | source="type" |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.staReserve.qty" |
| | | source="qty" |
| | | validate={required()} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.staReserve.state" |
| | | source="state" |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.staReserve.reason" |
| | | source="reason" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <DateInput |
| | | label="table.field.staReserve.expireTime" |
| | | source="expireTime" |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <DateInput |
| | | label="table.field.staReserve.waitingAt" |
| | | source="waitingAt" |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <DateInput |
| | | label="table.field.staReserve.confirmedAt" |
| | | source="confirmedAt" |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <DateInput |
| | | label="table.field.staReserve.cancelledAt" |
| | | source="cancelledAt" |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.staReserve.uniqKey" |
| | | source="uniqKey" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | |
| | | </Grid> |
| | | <Grid item xs={12} md={4}> |
| | | <Typography variant="h6" gutterBottom> |
| | | {translate('common.edit.title.common')} |
| | | </Typography> |
| | | <StatusSelectInput /> |
| | | <Box mt="2em" /> |
| | | <MemoInput /> |
| | | </Grid> |
| | | </Grid> |
| | | </SimpleForm> |
| | | </Edit > |
| | | ) |
| | | } |
| | | |
| | | export default StaReserveEdit; |
| New file |
| | |
| | | import React, { useState, useRef, useEffect, useMemo, useCallback } from "react"; |
| | | import { useNavigate } from 'react-router-dom'; |
| | | import { |
| | | List, |
| | | DatagridConfigurable, |
| | | SearchInput, |
| | | TopToolbar, |
| | | SelectColumnsButton, |
| | | EditButton, |
| | | FilterButton, |
| | | CreateButton, |
| | | ExportButton, |
| | | BulkDeleteButton, |
| | | WrapperField, |
| | | useRecordContext, |
| | | useTranslate, |
| | | useNotify, |
| | | useListContext, |
| | | FunctionField, |
| | | TextField, |
| | | NumberField, |
| | | DateField, |
| | | BooleanField, |
| | | ReferenceField, |
| | | TextInput, |
| | | DateTimeInput, |
| | | DateInput, |
| | | SelectInput, |
| | | NumberInput, |
| | | ReferenceInput, |
| | | ReferenceArrayInput, |
| | | AutocompleteInput, |
| | | DeleteButton, |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import StaReserveCreate from "./StaReserveCreate"; |
| | | import StaReservePanel from "./StaReservePanel"; |
| | | import EmptyData from "../components/EmptyData"; |
| | | 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'; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | | height: '.9em' |
| | | }, |
| | | '& .RaDatagrid-row': { |
| | | cursor: 'auto' |
| | | }, |
| | | '& .column-name': { |
| | | }, |
| | | '& .opt': { |
| | | width: 200 |
| | | }, |
| | | })); |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | |
| | | <TextInput source="uuid" label="table.field.staReserve.uuid" />, |
| | | <ReferenceInput source="staId" label="table.field.staReserve.staId" reference="sta"> |
| | | <AutocompleteInput label="table.field.staReserve.staId" optionText="staNo" filterToQuery={(val) => ({ staNo: val })} /> |
| | | </ReferenceInput>, |
| | | <ReferenceInput source="taskId" label="table.field.staReserve.taskId" reference="task"> |
| | | <AutocompleteInput label="table.field.staReserve.taskId" optionText="seqNum" filterToQuery={(val) => ({ seqNum: val })} /> |
| | | </ReferenceInput>, |
| | | <ReferenceInput source="segmentId" label="table.field.staReserve.segmentId" reference="segment"> |
| | | <AutocompleteInput label="table.field.staReserve.segmentId" optionText="uuid" filterToQuery={(val) => ({ uuid: val })} /> |
| | | </ReferenceInput>, |
| | | <ReferenceInput source="agvId" label="table.field.staReserve.agvId" reference="agv"> |
| | | <AutocompleteInput label="table.field.staReserve.agvId" optionText="uuid" filterToQuery={(val) => ({ uuid: val })} /> |
| | | </ReferenceInput>, |
| | | <TextInput source="name" label="table.field.staReserve.name" />, |
| | | <TextInput source="type" label="table.field.staReserve.type" />, |
| | | <NumberInput source="qty" label="table.field.staReserve.qty" />, |
| | | <TextInput source="state" label="table.field.staReserve.state" />, |
| | | <TextInput source="reason" label="table.field.staReserve.reason" />, |
| | | <DateInput source="expireTime" label="table.field.staReserve.expireTime" />, |
| | | <DateInput source="waitingAt" label="table.field.staReserve.waitingAt" />, |
| | | <DateInput source="confirmedAt" label="table.field.staReserve.confirmedAt" />, |
| | | <DateInput source="cancelledAt" label="table.field.staReserve.cancelledAt" />, |
| | | <TextInput source="uniqKey" label="table.field.staReserve.uniqKey" />, |
| | | |
| | | <TextInput label="common.field.memo" source="memo" />, |
| | | <SelectInput |
| | | label="common.field.status" |
| | | source="status" |
| | | choices={[ |
| | | { id: '1', name: 'common.enums.statusTrue' }, |
| | | { id: '0', name: 'common.enums.statusFalse' }, |
| | | ]} |
| | | resettable |
| | | />, |
| | | ] |
| | | |
| | | const StaReserveList = () => { |
| | | const translate = useTranslate(); |
| | | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | |
| | | return ( |
| | | <Box display="flex"> |
| | | <List |
| | | sx={{ |
| | | flexGrow: 1, |
| | | transition: (theme) => |
| | | theme.transitions.create(['all'], { |
| | | duration: theme.transitions.duration.enteringScreen, |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.staReserve"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | | filters={filters} |
| | | sort={{ field: "create_time", order: "desc" }} |
| | | actions={( |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <MyCreateButton onClick={() => { setCreateDialog(true) }} /> |
| | | <SelectColumnsButton preferenceKey='staReserve' /> |
| | | <MyExportButton /> |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | | > |
| | | <StyledDatagrid |
| | | preferenceKey='staReserve' |
| | | bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />} |
| | | rowClick={(id, resource, record) => false} |
| | | expand={() => <StaReservePanel />} |
| | | expandSingle={true} |
| | | omit={['id', 'createTime', 'createBy', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <TextField source="uuid" label="table.field.staReserve.uuid" /> |
| | | <ReferenceField source="staId" label="table.field.staReserve.staId" reference="sta" link={false} sortable={false}> |
| | | <TextField source="staNo" /> |
| | | </ReferenceField> |
| | | <ReferenceField source="taskId" label="table.field.staReserve.taskId" reference="task" link={false} sortable={false}> |
| | | <TextField source="seqNum" /> |
| | | </ReferenceField> |
| | | <ReferenceField source="segmentId" label="table.field.staReserve.segmentId" reference="segment" link={false} sortable={false}> |
| | | <TextField source="uuid" /> |
| | | </ReferenceField> |
| | | <ReferenceField source="agvId" label="table.field.staReserve.agvId" reference="agv" link={false} sortable={false}> |
| | | <TextField source="uuid" /> |
| | | </ReferenceField> |
| | | <TextField source="name" label="table.field.staReserve.name" /> |
| | | <TextField source="type" label="table.field.staReserve.type" /> |
| | | <NumberField source="qty" label="table.field.staReserve.qty" /> |
| | | <TextField source="state" label="table.field.staReserve.state" /> |
| | | <TextField source="reason" label="table.field.staReserve.reason" /> |
| | | <DateField source="expireTime" label="table.field.staReserve.expireTime" showTime /> |
| | | <DateField source="waitingAt" label="table.field.staReserve.waitingAt" showTime /> |
| | | <DateField source="confirmedAt" label="table.field.staReserve.confirmedAt" showTime /> |
| | | <DateField source="cancelledAt" label="table.field.staReserve.cancelledAt" showTime /> |
| | | <TextField source="uniqKey" label="table.field.staReserve.uniqKey" /> |
| | | |
| | | <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}> |
| | | <TextField source="nickname" /> |
| | | </ReferenceField> |
| | | <DateField source="updateTime" label="common.field.updateTime" showTime /> |
| | | <ReferenceField source="createBy" label="common.field.createBy" reference="user" link={false} sortable={false}> |
| | | <TextField source="nickname" /> |
| | | </ReferenceField> |
| | | <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> |
| | | <StaReserveCreate |
| | | open={createDialog} |
| | | setOpen={setCreateDialog} |
| | | /> |
| | | <PageDrawer |
| | | title='StaReserve Detail' |
| | | drawerVal={drawerVal} |
| | | setDrawerVal={setDrawerVal} |
| | | > |
| | | </PageDrawer> |
| | | </Box> |
| | | ) |
| | | } |
| | | |
| | | export default StaReserveList; |
| New file |
| | |
| | | import React, { useState, useRef, useEffect, useMemo } from "react"; |
| | | import { Box, Card, CardContent, Grid, Typography, Tooltip } from '@mui/material'; |
| | | import { |
| | | useTranslate, |
| | | useRecordContext, |
| | | } from 'react-admin'; |
| | | import PanelTypography from "../components/PanelTypography"; |
| | | import * as Common from '@/utils/common' |
| | | |
| | | const StaReservePanel = () => { |
| | | const record = useRecordContext(); |
| | | if (!record) return null; |
| | | const translate = useTranslate(); |
| | | return ( |
| | | <> |
| | | <Card sx={{ width: { xs: 300, sm: 500, md: 600, lg: 800 }, margin: 'auto' }}> |
| | | <CardContent> |
| | | <Grid container spacing={2}> |
| | | <Grid item xs={12} sx={{ display: 'flex', justifyContent: 'space-between' }}> |
| | | <Typography variant="h6" gutterBottom align="left" sx={{ |
| | | maxWidth: { xs: '100px', sm: '180px', md: '260px', lg: '360px' }, |
| | | whiteSpace: 'nowrap', |
| | | overflow: 'hidden', |
| | | textOverflow: 'ellipsis', |
| | | }}> |
| | | {Common.camelToPascalWithSpaces(translate('table.field.staReserve.name'))}: {record.name} |
| | | </Typography> |
| | | {/* inherit, primary, secondary, textPrimary, textSecondary, error */} |
| | | <Typography variant="h6" gutterBottom align="right" > |
| | | ID: {record.id} |
| | | </Typography> |
| | | </Grid> |
| | | </Grid> |
| | | <Grid container spacing={2}> |
| | | <Grid item xs={12} container alignContent="flex-end"> |
| | | <Typography variant="caption" color="textSecondary" sx={{ wordWrap: 'break-word', wordBreak: 'break-all' }}> |
| | | {Common.camelToPascalWithSpaces(translate('common.field.memo'))}:{record.memo} |
| | | </Typography> |
| | | </Grid> |
| | | </Grid> |
| | | <Box height={20}> </Box> |
| | | <Grid container spacing={2}> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.staReserve.uuid" |
| | | property={record.uuid} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.staReserve.staId" |
| | | property={record.staId$} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.staReserve.taskId" |
| | | property={record.taskId$} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.staReserve.segmentId" |
| | | property={record.segmentId$} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.staReserve.agvId" |
| | | property={record.agvId$} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.staReserve.name" |
| | | property={record.name} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.staReserve.type" |
| | | property={record.type} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.staReserve.qty" |
| | | property={record.qty} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.staReserve.state" |
| | | property={record.state} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.staReserve.reason" |
| | | property={record.reason} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.staReserve.expireTime" |
| | | property={record.expireTime$} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.staReserve.waitingAt" |
| | | property={record.waitingAt$} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.staReserve.confirmedAt" |
| | | property={record.confirmedAt$} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.staReserve.cancelledAt" |
| | | property={record.cancelledAt$} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.staReserve.uniqKey" |
| | | property={record.uniqKey} |
| | | /> |
| | | </Grid> |
| | | |
| | | </Grid> |
| | | </CardContent> |
| | | </Card > |
| | | </> |
| | | ); |
| | | }; |
| | | |
| | | export default StaReservePanel; |
| New file |
| | |
| | | import React, { useState, useRef, useEffect, useMemo } from "react"; |
| | | import { |
| | | ListGuesser, |
| | | EditGuesser, |
| | | ShowGuesser, |
| | | } from "react-admin"; |
| | | |
| | | import StaReserveList from "./StaReserveList"; |
| | | import StaReserveEdit from "./StaReserveEdit"; |
| | | |
| | | export default { |
| | | list: StaReserveList, |
| | | edit: StaReserveEdit, |
| | | show: ShowGuesser, |
| | | recordRepresentation: (record) => { |
| | | return `${record.name}` |
| | | } |
| | | }; |
| | |
| | | // generator.username="sa";priority |
| | | // generator.password="Zoneyung@zy56$"; |
| | | |
| | | generator.table="man_area_agv"; |
| | | generator.tableDesc="AreaAgv"; |
| | | generator.table="man_sta_reserve"; |
| | | generator.tableDesc="StaReserve"; |
| | | generator.packagePath="com.zy.acs.manager.manager"; |
| | | |
| | | generator.build(); |
| New file |
| | |
| | | package com.zy.acs.manager.manager.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.zy.acs.framework.common.Cools; |
| | | import com.zy.acs.framework.common.R; |
| | | import com.zy.acs.manager.common.utils.ExcelUtil; |
| | | import com.zy.acs.manager.common.annotation.OperationLog; |
| | | import com.zy.acs.manager.common.domain.BaseParam; |
| | | import com.zy.acs.manager.common.domain.KeyValVo; |
| | | import com.zy.acs.manager.common.domain.PageParam; |
| | | import com.zy.acs.manager.manager.entity.StaReserve; |
| | | import com.zy.acs.manager.manager.service.StaReserveService; |
| | | import com.zy.acs.manager.system.controller.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | @RequestMapping("/api") |
| | | public class StaReserveController extends BaseController { |
| | | |
| | | @Autowired |
| | | private StaReserveService staReserveService; |
| | | |
| | | @PreAuthorize("hasAuthority('manager:staReserve:list')") |
| | | @PostMapping("/staReserve/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<StaReserve, BaseParam> pageParam = new PageParam<>(baseParam, StaReserve.class); |
| | | return R.ok().add(staReserveService.page(pageParam, pageParam.buildWrapper(true))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:staReserve:list')") |
| | | @PostMapping("/staReserve/list") |
| | | public R list(@RequestBody Map<String, Object> map) { |
| | | return R.ok().add(staReserveService.list()); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:staReserve:list')") |
| | | @PostMapping({"/staReserve/many/{ids}", "/staReserves/many/{ids}"}) |
| | | public R many(@PathVariable Long[] ids) { |
| | | return R.ok().add(staReserveService.listByIds(Arrays.asList(ids))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:staReserve:list')") |
| | | @GetMapping("/staReserve/{id}") |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok().add(staReserveService.getById(id)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:staReserve:save')") |
| | | @OperationLog("Create StaReserve") |
| | | @PostMapping("/staReserve/save") |
| | | public R save(@RequestBody StaReserve staReserve) { |
| | | staReserve.setCreateBy(getLoginUserId()); |
| | | staReserve.setCreateTime(new Date()); |
| | | staReserve.setUpdateBy(getLoginUserId()); |
| | | staReserve.setUpdateTime(new Date()); |
| | | if (!staReserveService.save(staReserve)) { |
| | | return R.error("Save Fail"); |
| | | } |
| | | return R.ok("Save Success").add(staReserve); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:staReserve:update')") |
| | | @OperationLog("Update StaReserve") |
| | | @PostMapping("/staReserve/update") |
| | | public R update(@RequestBody StaReserve staReserve) { |
| | | staReserve.setUpdateBy(getLoginUserId()); |
| | | staReserve.setUpdateTime(new Date()); |
| | | if (!staReserveService.updateById(staReserve)) { |
| | | return R.error("Update Fail"); |
| | | } |
| | | return R.ok("Update Success").add(staReserve); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:staReserve:remove')") |
| | | @OperationLog("Delete StaReserve") |
| | | @PostMapping("/staReserve/remove/{ids}") |
| | | public R remove(@PathVariable Long[] ids) { |
| | | if (!staReserveService.removeByIds(Arrays.asList(ids))) { |
| | | return R.error("Delete Fail"); |
| | | } |
| | | return R.ok("Delete Success").add(ids); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:staReserve:list')") |
| | | @PostMapping("/staReserve/query") |
| | | public R query(@RequestParam(required = false) String condition) { |
| | | List<KeyValVo> vos = new ArrayList<>(); |
| | | LambdaQueryWrapper<StaReserve> wrapper = new LambdaQueryWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(StaReserve::getName, condition); |
| | | } |
| | | staReserveService.page(new Page<>(1, 30), wrapper).getRecords().forEach( |
| | | item -> vos.add(new KeyValVo(item.getId(), item.getName())) |
| | | ); |
| | | return R.ok().add(vos); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:staReserve:list')") |
| | | @PostMapping("/staReserve/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(staReserveService.list(), StaReserve.class), response); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.acs.manager.manager.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("man_sta_reserve") |
| | | public class StaReserve implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value= "标识") |
| | | private String uuid; |
| | | |
| | | @ApiModelProperty(value= "站点") |
| | | private Long staId; |
| | | |
| | | @ApiModelProperty(value= "任务") |
| | | private Long taskId; |
| | | |
| | | @ApiModelProperty(value= "作业") |
| | | private Long segmentId; |
| | | |
| | | @ApiModelProperty(value= "AGV") |
| | | private Long agvId; |
| | | |
| | | @ApiModelProperty(value= "名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value= "预约类型") |
| | | private String type; |
| | | |
| | | @ApiModelProperty(value= "预约数量") |
| | | private Integer qty; |
| | | |
| | | @ApiModelProperty(value= "预约状态") |
| | | private String state; |
| | | |
| | | @ApiModelProperty(value= "原因") |
| | | private String reason; |
| | | |
| | | @ApiModelProperty(value= "过期时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date expireTime; |
| | | |
| | | @ApiModelProperty(value= "开始等待时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date waitingAt; |
| | | |
| | | @ApiModelProperty(value= "确认时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date confirmedAt; |
| | | |
| | | @ApiModelProperty(value= "取消时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date cancelledAt; |
| | | |
| | | @ApiModelProperty(value= "幂等键") |
| | | private String uniqKey; |
| | | |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 冻结 ") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | @ApiModelProperty(value= "租户") |
| | | private Integer tenantId; |
| | | |
| | | @ApiModelProperty(value= "添加人员") |
| | | private Long createBy; |
| | | |
| | | @ApiModelProperty(value= "添加时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty(value= "修改人员") |
| | | private Long updateBy; |
| | | |
| | | @ApiModelProperty(value= "修改时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | // public StaReserve() {} |
| | | // |
| | | // public StaReserve(String uuid,Long staId,Long taskId,Long segmentId,Long agvId,String name,String type,Integer qty,String state,String reason,Date expireTime,Date waitingAt,Date confirmedAt,Date cancelledAt,String uniqKey,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | // this.uuid = uuid; |
| | | // this.staId = staId; |
| | | // this.taskId = taskId; |
| | | // this.segmentId = segmentId; |
| | | // this.agvId = agvId; |
| | | // this.name = name; |
| | | // this.type = type; |
| | | // this.qty = qty; |
| | | // this.state = state; |
| | | // this.reason = reason; |
| | | // this.expireTime = expireTime; |
| | | // this.waitingAt = waitingAt; |
| | | // this.confirmedAt = confirmedAt; |
| | | // this.cancelledAt = cancelledAt; |
| | | // this.uniqKey = uniqKey; |
| | | // this.status = status; |
| | | // this.deleted = deleted; |
| | | // this.tenantId = tenantId; |
| | | // this.createBy = createBy; |
| | | // this.createTime = createTime; |
| | | // this.updateBy = updateBy; |
| | | // this.updateTime = updateTime; |
| | | // this.memo = memo; |
| | | // } |
| | | // |
| | | //// StaReserve staReserve = new StaReserve( |
| | | //// null, // 标识 |
| | | //// null, // 站点[非空] |
| | | //// null, // 任务[非空] |
| | | //// null, // 作业 |
| | | //// null, // AGV[非空] |
| | | //// null, // 名称 |
| | | //// null, // 预约类型[非空] |
| | | //// null, // 预约数量[非空] |
| | | //// null, // 预约状态[非空] |
| | | //// null, // 原因 |
| | | //// null, // 过期时间 |
| | | //// null, // 开始等待时间 |
| | | //// null, // 确认完成时间 |
| | | //// null, // 取消时间 |
| | | //// null, // 幂等键 |
| | | //// null, // 状态[非空] |
| | | //// null, // 是否删除[非空] |
| | | //// null, // 租户 |
| | | //// null, // 添加人员 |
| | | //// null, // 添加时间[非空] |
| | | //// null, // 修改人员 |
| | | //// null, // 修改时间 |
| | | //// null // 备注 |
| | | //// ); |
| | | // |
| | | // public String getStaId$(){ |
| | | // StaService service = SpringUtils.getBean(StaService.class); |
| | | // Sta sta = service.getById(this.staId); |
| | | // if (!Cools.isEmpty(sta)){ |
| | | // return String.valueOf(sta.getStaNo()); |
| | | // } |
| | | // return null; |
| | | // } |
| | | // |
| | | // public String getTaskId$(){ |
| | | // TaskService service = SpringUtils.getBean(TaskService.class); |
| | | // Task task = service.getById(this.taskId); |
| | | // if (!Cools.isEmpty(task)){ |
| | | // return String.valueOf(task.getSeqNum()); |
| | | // } |
| | | // return null; |
| | | // } |
| | | // |
| | | // public String getSegmentId$(){ |
| | | // SegmentService service = SpringUtils.getBean(SegmentService.class); |
| | | // Segment segment = service.getById(this.segmentId); |
| | | // if (!Cools.isEmpty(segment)){ |
| | | // return String.valueOf(segment.getUuid()); |
| | | // } |
| | | // return null; |
| | | // } |
| | | // |
| | | // public String getAgvId$(){ |
| | | // AgvService service = SpringUtils.getBean(AgvService.class); |
| | | // Agv agv = service.getById(this.agvId); |
| | | // if (!Cools.isEmpty(agv)){ |
| | | // return String.valueOf(agv.getUuid()); |
| | | // } |
| | | // return null; |
| | | // } |
| | | // |
| | | // public String getExpireTime$(){ |
| | | // if (Cools.isEmpty(this.expireTime)){ |
| | | // return ""; |
| | | // } |
| | | // return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.expireTime); |
| | | // } |
| | | // |
| | | // public String getWaitingAt$(){ |
| | | // if (Cools.isEmpty(this.waitingAt)){ |
| | | // return ""; |
| | | // } |
| | | // return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.waitingAt); |
| | | // } |
| | | // |
| | | // public String getConfirmedAt$(){ |
| | | // if (Cools.isEmpty(this.confirmedAt)){ |
| | | // return ""; |
| | | // } |
| | | // return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.confirmedAt); |
| | | // } |
| | | // |
| | | // public String getCancelledAt$(){ |
| | | // if (Cools.isEmpty(this.cancelledAt)){ |
| | | // return ""; |
| | | // } |
| | | // return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.cancelledAt); |
| | | // } |
| | | // |
| | | // public String getStatus$(){ |
| | | // if (null == this.status){ return null; } |
| | | // switch (this.status){ |
| | | // case 1: |
| | | // return "正常"; |
| | | // case 0: |
| | | // return "冻结"; |
| | | // default: |
| | | // return String.valueOf(this.status); |
| | | // } |
| | | // } |
| | | // |
| | | // public String getTenantId$(){ |
| | | // TenantService service = SpringUtils.getBean(TenantService.class); |
| | | // Tenant tenant = service.getById(this.tenantId); |
| | | // if (!Cools.isEmpty(tenant)){ |
| | | // return String.valueOf(tenant.getName()); |
| | | // } |
| | | // return null; |
| | | // } |
| | | // |
| | | // public String getCreateBy$(){ |
| | | // UserService service = SpringUtils.getBean(UserService.class); |
| | | // User user = service.getById(this.createBy); |
| | | // if (!Cools.isEmpty(user)){ |
| | | // return String.valueOf(user.getNickname()); |
| | | // } |
| | | // return null; |
| | | // } |
| | | // |
| | | // public String getCreateTime$(){ |
| | | // if (Cools.isEmpty(this.createTime)){ |
| | | // return ""; |
| | | // } |
| | | // return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | // } |
| | | // |
| | | // public String getUpdateBy$(){ |
| | | // UserService service = SpringUtils.getBean(UserService.class); |
| | | // User user = service.getById(this.updateBy); |
| | | // if (!Cools.isEmpty(user)){ |
| | | // return String.valueOf(user.getNickname()); |
| | | // } |
| | | // return null; |
| | | // } |
| | | // |
| | | // public String getUpdateTime$(){ |
| | | // if (Cools.isEmpty(this.updateTime)){ |
| | | // return ""; |
| | | // } |
| | | // return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | // } |
| | | |
| | | public Boolean getStatusBool(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return true; |
| | | case 0: |
| | | return false; |
| | | default: |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.acs.manager.manager.mapper; |
| | | |
| | | import com.zy.acs.manager.manager.entity.StaReserve; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface StaReserveMapper extends BaseMapper<StaReserve> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.acs.manager.manager.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.acs.manager.manager.entity.StaReserve; |
| | | |
| | | public interface StaReserveService extends IService<StaReserve> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.acs.manager.manager.service.impl; |
| | | |
| | | import com.zy.acs.manager.manager.mapper.StaReserveMapper; |
| | | import com.zy.acs.manager.manager.entity.StaReserve; |
| | | import com.zy.acs.manager.manager.service.StaReserveService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("staReserveService") |
| | | public class StaReserveServiceImpl extends ServiceImpl<StaReserveMapper, StaReserve> implements StaReserveService { |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.acs.manager.manager.mapper.StaReserveMapper"> |
| | | |
| | | </mapper> |