#新增
1. 新增数据字典管理功能
2. 新增字典数据集管理功能
3. 删除库存,库存信息管理功能
4个文件已修改
21个文件已添加
7个文件已删除
1 文件已复制
5 文件已重命名
| | |
| | | loc: 'Loc', |
| | | container: 'Container', |
| | | contract: 'Contract', |
| | | stockItem: 'StockItem', |
| | | qlyInspect: 'QlyInspect', |
| | | dictType: 'DictType', |
| | | dictData: 'DictData', |
| | | |
| | | |
| | | |
| | | }, |
| | | table: { |
| | | field: { |
| | |
| | | name: "Name", |
| | | projectName: "ProjectName", |
| | | }, |
| | | stockItem: { |
| | | stockId: "stockId", |
| | | matnrId: "matnrId", |
| | | qlyInspect: { |
| | | code: "code", |
| | | matnrk: "matnrk", |
| | | anfme: "anfme", |
| | | workQty: "workQty", |
| | | qty: "qty", |
| | | weight: "weight", |
| | | unit: "unit", |
| | | shipperId: "shipperId", |
| | | splrId: "splrId", |
| | | brand: "brand", |
| | | batch: "batch", |
| | | prodTime: "prodTime", |
| | | inspectId: "inspectId", |
| | | splrBtch: "splrBtch", |
| | | asnOrder: "asnOrder", |
| | | erpToken: "erpToken", |
| | | erpOrder: "erpOrder", |
| | | erpStkAdr: "erpStkAdr", |
| | | locId: "locId", |
| | | barcode: "barcode", |
| | | purPrice: "purPrice", |
| | | lockReason: "lockReason", |
| | | lockStatus: "lockStatus", |
| | | locker: "locker", |
| | | lockedTime: "lockedTime", |
| | | name: "name", |
| | | }, |
| | | dictType: { |
| | | name: "name", |
| | | description: "description", |
| | | }, |
| | | dictData: { |
| | | dictTypeId: "dictTypeId", |
| | | dictTypeCode: "dictTypeCode", |
| | | value: "value", |
| | | label: "label", |
| | | sort: "sort", |
| | | color: "color", |
| | | }, |
| | | } |
| | | }, |
| | |
| | | loc: '基础库位', |
| | | container: '容器管理', |
| | | contract: '合同信息', |
| | | stockItem: '库存明细', |
| | | stock: '库存信息', |
| | | qlyInspect: '质检信息', |
| | | dictType: '数据字典', |
| | | dictData: '字典数据集', |
| | | |
| | | |
| | | |
| | | }, |
| | |
| | | name: "名称", |
| | | projectName: "项目名称", |
| | | }, |
| | | stock: { |
| | | asnOrder: "库存单据", |
| | | erpToken: "ERP凭证", |
| | | erpOrder: "ERP单据", |
| | | erpStkAdr: "ERP库存地", |
| | | contractId: "合同标识", |
| | | lockReason: "加锁原因", |
| | | lockStatus: "加载状态", |
| | | locker: "加锁人", |
| | | lockedTime: "加锁时间", |
| | | }, |
| | | stockItem: { |
| | | stockId: "库存标识", |
| | | matnrId: "物料标识", |
| | | code: "物料编码", |
| | | matnrk: "物料名称", |
| | | anfme: "数量", |
| | | workQty: "执行中数量", |
| | | qty: "已完成数量", |
| | | weight: "重量", |
| | | unit: "单位", |
| | | shipperId: "货主", |
| | | splrId: "供应商", |
| | | brand: "品牌", |
| | | batch: "批次", |
| | | prodTime: "生产日期", |
| | | inspectId: "质查标识", |
| | | splrBtch: "供应商批次", |
| | | locId: "库位标识", |
| | | barcode: "容器编码", |
| | | purPrice: "采购价", |
| | | }, |
| | | qlyInspect: { |
| | | code: "编码", |
| | | name: "名称", |
| | | }, |
| | | |
| | | dictType: { |
| | | name: "字典名称", |
| | | description: "内容描述", |
| | | }, |
| | | dictData: { |
| | | dictTypeId: "字典标识", |
| | | dictTypeCode: "字典编码", |
| | | value: "值", |
| | | label: "别名", |
| | | sort: "排序", |
| | | color: "颜色", |
| | | }, |
| | | } |
| | | }, |
| | | page: { |
| | |
| | | import loc from './loc'; |
| | | import container from './container'; |
| | | import contract from './contract'; |
| | | import stockItem from './stockItem'; |
| | | import stock from './stock'; |
| | | import qlyInspect from './qlyInspect'; |
| | | import dictType from './dictType'; |
| | | import dictData from './dictData'; |
| | | |
| | | |
| | | const ResourceContent = (node) => { |
| | |
| | | return container; |
| | | case 'contract': |
| | | return contract; |
| | | case 'stockItem': |
| | | return stockItem; |
| | | case 'stock': |
| | | return stock; |
| | | case 'qlyInspect': |
| | | return qlyInspect; |
| | | case 'dictType': |
| | | return dictType; |
| | | case 'dictData': |
| | | return dictData; |
| | | default: |
| | | return { |
| | | list: ListGuesser, |
File was renamed from rsf-admin/src/page/stock/StockCreate.jsx |
| | |
| | | import StatusSelectInput from "../components/StatusSelectInput"; |
| | | import MemoInput from "../components/MemoInput"; |
| | | |
| | | const StockCreate = (props) => { |
| | | const DictDataCreate = (props) => { |
| | | const { open, setOpen } = props; |
| | | |
| | | const translate = useTranslate(); |
| | |
| | | <Grid container rowSpacing={2} columnSpacing={2}> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.stock.asnOrder" |
| | | source="asnOrder" |
| | | label="table.field.dictData.dictTypeId" |
| | | source="dictTypeId" |
| | | parse={v => v} |
| | | autoFocus |
| | | validate={required()} |
| | |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.stock.erpToken" |
| | | source="erpToken" |
| | | label="table.field.dictData.dictTypeCode" |
| | | source="dictTypeCode" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.stock.erpOrder" |
| | | source="erpOrder" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.stock.erpStkAdr" |
| | | source="erpStkAdr" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.stock.contractId" |
| | | source="contractId" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.stock.lockReason" |
| | | source="lockReason" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.stock.lockStatus" |
| | | source="lockStatus" |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.stock.locker" |
| | | source="locker" |
| | | label="table.field.dictData.value" |
| | | source="value" |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <DateInput |
| | | label="table.field.stock.lockedTime" |
| | | source="lockedTime" |
| | | <TextInput |
| | | label="table.field.dictData.label" |
| | | source="label" |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.dictData.sort" |
| | | source="sort" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.dictData.color" |
| | | source="color" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | |
| | |
| | | ) |
| | | } |
| | | |
| | | export default StockCreate; |
| | | export default DictDataCreate; |
File was renamed from rsf-admin/src/page/stock/StockEdit.jsx |
| | |
| | | ) |
| | | } |
| | | |
| | | const StockEdit = () => { |
| | | const DictDataEdit = () => { |
| | | const translate = useTranslate(); |
| | | |
| | | return ( |
| | |
| | | </Typography> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.stock.asnOrder" |
| | | source="asnOrder" |
| | | label="table.field.dictData.dictTypeId" |
| | | source="dictTypeId" |
| | | parse={v => v} |
| | | autoFocus |
| | | validate={required()} |
| | |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.stock.erpToken" |
| | | source="erpToken" |
| | | label="table.field.dictData.dictTypeCode" |
| | | source="dictTypeCode" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.stock.erpOrder" |
| | | source="erpOrder" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.stock.erpStkAdr" |
| | | source="erpStkAdr" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.stock.contractId" |
| | | source="contractId" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.stock.lockReason" |
| | | source="lockReason" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.stock.lockStatus" |
| | | source="lockStatus" |
| | | validate={required()} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.stock.locker" |
| | | source="locker" |
| | | label="table.field.dictData.value" |
| | | source="value" |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <DateInput |
| | | label="table.field.stock.lockedTime" |
| | | source="lockedTime" |
| | | <TextInput |
| | | label="table.field.dictData.label" |
| | | source="label" |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.dictData.sort" |
| | | source="sort" |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.dictData.color" |
| | | source="color" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | |
| | |
| | | ) |
| | | } |
| | | |
| | | export default StockEdit; |
| | | export default DictDataEdit; |
copy from rsf-admin/src/page/stock/StockList.jsx
copy to rsf-admin/src/page/dictData/DictDataList.jsx
File was copied from rsf-admin/src/page/stock/StockList.jsx |
| | |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import StockCreate from "./StockCreate"; |
| | | import StockPanel from "./StockPanel"; |
| | | import DictDataCreate from "./DictDataCreate"; |
| | | import DictDataPanel from "./DictDataPanel"; |
| | | import EmptyData from "../components/EmptyData"; |
| | | import MyCreateButton from "../components/MyCreateButton"; |
| | | import MyExportButton from '../components/MyExportButton'; |
| | |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | |
| | | <TextInput source="asnOrder" label="table.field.stock.asnOrder" />, |
| | | <TextInput source="erpToken" label="table.field.stock.erpToken" />, |
| | | <TextInput source="erpOrder" label="table.field.stock.erpOrder" />, |
| | | <TextInput source="erpStkAdr" label="table.field.stock.erpStkAdr" />, |
| | | <TextInput source="contractId" label="table.field.stock.contractId" />, |
| | | <TextInput source="lockReason" label="table.field.stock.lockReason" />, |
| | | <NumberInput source="lockStatus" label="table.field.stock.lockStatus" />, |
| | | <TextInput source="locker" label="table.field.stock.locker" />, |
| | | <DateInput source="lockedTime" label="table.field.stock.lockedTime" />, |
| | | <TextInput source="dictTypeId" label="table.field.dictData.dictTypeId" />, |
| | | <TextInput source="dictTypeCode" label="table.field.dictData.dictTypeCode" />, |
| | | <TextInput source="value" label="table.field.dictData.value" />, |
| | | <TextInput source="label" label="table.field.dictData.label" />, |
| | | <NumberInput source="sort" label="table.field.dictData.sort" />, |
| | | <TextInput source="color" label="table.field.dictData.color" />, |
| | | |
| | | <TextInput label="common.field.memo" source="memo" />, |
| | | <SelectInput |
| | |
| | | />, |
| | | ] |
| | | |
| | | const StockList = () => { |
| | | const DictDataList = () => { |
| | | const translate = useTranslate(); |
| | | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.stock"} |
| | | title={"menu.dictData"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | | filters={filters} |
| | | sort={{ field: "create_time", order: "desc" }} |
| | |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <MyCreateButton onClick={() => { setCreateDialog(true) }} /> |
| | | <SelectColumnsButton preferenceKey='stock' /> |
| | | <SelectColumnsButton preferenceKey='dictData' /> |
| | | <MyExportButton /> |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | | > |
| | | <StyledDatagrid |
| | | preferenceKey='stock' |
| | | preferenceKey='dictData' |
| | | bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />} |
| | | rowClick={(id, resource, record) => false} |
| | | expand={() => <StockPanel />} |
| | | expand={() => <DictDataPanel />} |
| | | expandSingle={true} |
| | | omit={['id', 'createTime', 'createBy', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <TextField source="asnOrder" label="table.field.stock.asnOrder" /> |
| | | <TextField source="erpToken" label="table.field.stock.erpToken" /> |
| | | <TextField source="erpOrder" label="table.field.stock.erpOrder" /> |
| | | <TextField source="erpStkAdr" label="table.field.stock.erpStkAdr" /> |
| | | <TextField source="contractId" label="table.field.stock.contractId" /> |
| | | <TextField source="lockReason" label="table.field.stock.lockReason" /> |
| | | <NumberField source="lockStatus" label="table.field.stock.lockStatus" /> |
| | | <TextField source="locker" label="table.field.stock.locker" /> |
| | | <DateField source="lockedTime" label="table.field.stock.lockedTime" showTime /> |
| | | <TextField source="dictTypeId" label="table.field.dictData.dictTypeId" /> |
| | | <TextField source="dictTypeCode" label="table.field.dictData.dictTypeCode" /> |
| | | <TextField source="value" label="table.field.dictData.value" /> |
| | | <TextField source="label" label="table.field.dictData.label" /> |
| | | <NumberField source="sort" label="table.field.dictData.sort" /> |
| | | <TextField source="color" label="table.field.dictData.color" /> |
| | | |
| | | <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}> |
| | | <TextField source="nickname" /> |
| | |
| | | </WrapperField> |
| | | </StyledDatagrid> |
| | | </List> |
| | | <StockCreate |
| | | <DictDataCreate |
| | | open={createDialog} |
| | | setOpen={setCreateDialog} |
| | | /> |
| | | <PageDrawer |
| | | title='Stock Detail' |
| | | title='DictData Detail' |
| | | drawerVal={drawerVal} |
| | | setDrawerVal={setDrawerVal} |
| | | > |
| | |
| | | ) |
| | | } |
| | | |
| | | export default StockList; |
| | | export default DictDataList; |
File was renamed from rsf-admin/src/page/stock/StockPanel.jsx |
| | |
| | | import PanelTypography from "../components/PanelTypography"; |
| | | import * as Common from '@/utils/common' |
| | | |
| | | const StockPanel = () => { |
| | | const DictDataPanel = () => { |
| | | const record = useRecordContext(); |
| | | if (!record) return null; |
| | | const translate = useTranslate(); |
| | |
| | | overflow: 'hidden', |
| | | textOverflow: 'ellipsis', |
| | | }}> |
| | | {Common.camelToPascalWithSpaces(translate('table.field.stock.id'))}: {record.id} |
| | | {Common.camelToPascalWithSpaces(translate('table.field.dictData.id'))}: {record.id} |
| | | </Typography> |
| | | {/* inherit, primary, secondary, textPrimary, textSecondary, error */} |
| | | <Typography variant="h6" gutterBottom align="right" > |
| | |
| | | <Grid container spacing={2}> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.asnOrder" |
| | | property={record.asnOrder} |
| | | title="table.field.dictData.dictTypeId" |
| | | property={record.dictTypeId$} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.erpToken" |
| | | property={record.erpToken} |
| | | title="table.field.dictData.dictTypeCode" |
| | | property={record.dictTypeCode} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.erpOrder" |
| | | property={record.erpOrder} |
| | | title="table.field.dictData.value" |
| | | property={record.value} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.erpStkAdr" |
| | | property={record.erpStkAdr} |
| | | title="table.field.dictData.label" |
| | | property={record.label} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.contractId" |
| | | property={record.contractId$} |
| | | title="table.field.dictData.sort" |
| | | property={record.sort} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.lockReason" |
| | | property={record.lockReason} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.lockStatus" |
| | | property={record.lockStatus} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.locker" |
| | | property={record.locker} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.stock.lockedTime" |
| | | property={record.lockedTime$} |
| | | title="table.field.dictData.color" |
| | | property={record.color} |
| | | /> |
| | | </Grid> |
| | | |
| | |
| | | ); |
| | | }; |
| | | |
| | | export default StockPanel; |
| | | export default DictDataPanel; |
File was renamed from rsf-admin/src/page/stock/index.jsx |
| | |
| | | ShowGuesser, |
| | | } from "react-admin"; |
| | | |
| | | import StockList from "./StockList"; |
| | | import StockEdit from "./StockEdit"; |
| | | import DictDataList from "./DictDataList"; |
| | | import DictDataEdit from "./DictDataEdit"; |
| | | |
| | | export default { |
| | | list: StockList, |
| | | edit: StockEdit, |
| | | list: DictDataList, |
| | | edit: DictDataEdit, |
| | | show: ShowGuesser, |
| | | recordRepresentation: (record) => { |
| | | return `${record.id}` |
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 DictTypeCreate = (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 sx={{ mt: 2 }}> |
| | | <Grid container rowSpacing={2} columnSpacing={2}> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.dictType.name" |
| | | source="name" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.dictType.description" |
| | | source="description" |
| | | 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 DictTypeCreate; |
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 DictTypeEdit = () => { |
| | | 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.dictType.name" |
| | | source="name" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.dictType.description" |
| | | source="description" |
| | | 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 DictTypeEdit; |
File was renamed from rsf-admin/src/page/stock/StockList.jsx |
| | |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import StockCreate from "./StockCreate"; |
| | | import StockPanel from "./StockPanel"; |
| | | import DictTypeCreate from "./DictTypeCreate"; |
| | | import DictTypePanel from "./DictTypePanel"; |
| | | import EmptyData from "../components/EmptyData"; |
| | | import MyCreateButton from "../components/MyCreateButton"; |
| | | import MyExportButton from '../components/MyExportButton'; |
| | |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | |
| | | <TextInput source="asnOrder" label="table.field.stock.asnOrder" />, |
| | | <TextInput source="erpToken" label="table.field.stock.erpToken" />, |
| | | <TextInput source="erpOrder" label="table.field.stock.erpOrder" />, |
| | | <TextInput source="erpStkAdr" label="table.field.stock.erpStkAdr" />, |
| | | <TextInput source="contractId" label="table.field.stock.contractId" />, |
| | | <TextInput source="lockReason" label="table.field.stock.lockReason" />, |
| | | <NumberInput source="lockStatus" label="table.field.stock.lockStatus" />, |
| | | <TextInput source="locker" label="table.field.stock.locker" />, |
| | | <DateInput source="lockedTime" label="table.field.stock.lockedTime" />, |
| | | <TextInput source="uuid" label="table.field.dictType.uuid" />, |
| | | <TextInput source="name" label="table.field.dictType.name" />, |
| | | <TextInput source="description" label="table.field.dictType.description" />, |
| | | |
| | | <TextInput label="common.field.memo" source="memo" />, |
| | | <SelectInput |
| | |
| | | />, |
| | | ] |
| | | |
| | | const StockList = () => { |
| | | const DictTypeList = () => { |
| | | const translate = useTranslate(); |
| | | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.stock"} |
| | | title={"menu.dictType"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | | filters={filters} |
| | | sort={{ field: "create_time", order: "desc" }} |
| | |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <MyCreateButton onClick={() => { setCreateDialog(true) }} /> |
| | | <SelectColumnsButton preferenceKey='stock' /> |
| | | <SelectColumnsButton preferenceKey='dictType' /> |
| | | <MyExportButton /> |
| | | </TopToolbar> |
| | | )} |
| | | perPage={DEFAULT_PAGE_SIZE} |
| | | > |
| | | <StyledDatagrid |
| | | preferenceKey='stock' |
| | | preferenceKey='dictType' |
| | | bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />} |
| | | rowClick={(id, resource, record) => false} |
| | | expand={() => <StockPanel />} |
| | | expand={() => <DictTypePanel />} |
| | | expandSingle={true} |
| | | omit={['id', 'createTime', 'createBy', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <TextField source="asnOrder" label="table.field.stock.asnOrder" /> |
| | | <TextField source="erpToken" label="table.field.stock.erpToken" /> |
| | | <TextField source="erpOrder" label="table.field.stock.erpOrder" /> |
| | | <TextField source="erpStkAdr" label="table.field.stock.erpStkAdr" /> |
| | | <TextField source="contractId" label="table.field.stock.contractId" /> |
| | | <TextField source="lockReason" label="table.field.stock.lockReason" /> |
| | | <NumberField source="lockStatus" label="table.field.stock.lockStatus" /> |
| | | <TextField source="locker" label="table.field.stock.locker" /> |
| | | <DateField source="lockedTime" label="table.field.stock.lockedTime" showTime /> |
| | | <TextField source="name" label="table.field.dictType.name" /> |
| | | <TextField source="description" label="table.field.dictType.description" /> |
| | | |
| | | <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}> |
| | | <TextField source="nickname" /> |
| | |
| | | </WrapperField> |
| | | </StyledDatagrid> |
| | | </List> |
| | | <StockCreate |
| | | <DictTypeCreate |
| | | open={createDialog} |
| | | setOpen={setCreateDialog} |
| | | /> |
| | | <PageDrawer |
| | | title='Stock Detail' |
| | | title='DictType Detail' |
| | | drawerVal={drawerVal} |
| | | setDrawerVal={setDrawerVal} |
| | | > |
| | |
| | | ) |
| | | } |
| | | |
| | | export default StockList; |
| | | export default DictTypeList; |
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 DictTypePanel = () => { |
| | | 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.dictType.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.dictType.name" |
| | | property={record.name} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.dictType.description" |
| | | property={record.description} |
| | | /> |
| | | </Grid> |
| | | |
| | | </Grid> |
| | | </CardContent> |
| | | </Card > |
| | | </> |
| | | ); |
| | | }; |
| | | |
| | | export default DictTypePanel; |
New file |
| | |
| | | import React, { useState, useRef, useEffect, useMemo } from "react"; |
| | | import { |
| | | ListGuesser, |
| | | EditGuesser, |
| | | ShowGuesser, |
| | | } from "react-admin"; |
| | | |
| | | import DictTypeList from "./DictTypeList"; |
| | | import DictTypeEdit from "./DictTypeEdit"; |
| | | |
| | | export default { |
| | | list: DictTypeList, |
| | | edit: DictTypeEdit, |
| | | show: ShowGuesser, |
| | | recordRepresentation: (record) => { |
| | | return `${record.name}` |
| | | } |
| | | }; |
| | |
| | | // generator.username="sa"; |
| | | // generator.password="Zoneyung@zy56$"; |
| | | |
| | | generator.table="man_"; |
| | | generator.tableDesc="质检信息"; |
| | | generator.packagePath="com.vincent.rsf.server.manager"; |
| | | generator.table="sys_dict_data"; |
| | | generator.tableDesc="字典数据集"; |
| | | generator.packagePath="com.vincent.rsf.server.system"; |
| | | |
| | | generator.build(); |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.system.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.server.common.utils.ExcelUtil; |
| | | import com.vincent.rsf.server.common.annotation.OperationLog; |
| | | import com.vincent.rsf.server.common.domain.BaseParam; |
| | | import com.vincent.rsf.server.common.domain.KeyValVo; |
| | | import com.vincent.rsf.server.common.domain.PageParam; |
| | | import com.vincent.rsf.server.system.entity.DictData; |
| | | import com.vincent.rsf.server.system.service.DictDataService; |
| | | import com.vincent.rsf.server.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 |
| | | public class DictDataController extends BaseController { |
| | | |
| | | @Autowired |
| | | private DictDataService dictDataService; |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictData:list')") |
| | | @PostMapping("/dictData/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<DictData, BaseParam> pageParam = new PageParam<>(baseParam, DictData.class); |
| | | return R.ok().add(dictDataService.page(pageParam, pageParam.buildWrapper(true))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictData:list')") |
| | | @PostMapping("/dictData/list") |
| | | public R list(@RequestBody Map<String, Object> map) { |
| | | return R.ok().add(dictDataService.list()); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictData:list')") |
| | | @PostMapping({"/dictData/many/{ids}", "/dictDatas/many/{ids}"}) |
| | | public R many(@PathVariable Long[] ids) { |
| | | return R.ok().add(dictDataService.listByIds(Arrays.asList(ids))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictData:list')") |
| | | @GetMapping("/dictData/{id}") |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok().add(dictDataService.getById(id)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictData:save')") |
| | | @OperationLog("Create 字典数据集") |
| | | @PostMapping("/dictData/save") |
| | | public R save(@RequestBody DictData dictData) { |
| | | dictData.setCreateBy(getLoginUserId()); |
| | | dictData.setCreateTime(new Date()); |
| | | dictData.setUpdateBy(getLoginUserId()); |
| | | dictData.setUpdateTime(new Date()); |
| | | if (!dictDataService.save(dictData)) { |
| | | return R.error("Save Fail"); |
| | | } |
| | | return R.ok("Save Success").add(dictData); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictData:update')") |
| | | @OperationLog("Update 字典数据集") |
| | | @PostMapping("/dictData/update") |
| | | public R update(@RequestBody DictData dictData) { |
| | | dictData.setUpdateBy(getLoginUserId()); |
| | | dictData.setUpdateTime(new Date()); |
| | | if (!dictDataService.updateById(dictData)) { |
| | | return R.error("Update Fail"); |
| | | } |
| | | return R.ok("Update Success").add(dictData); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictData:remove')") |
| | | @OperationLog("Delete 字典数据集") |
| | | @PostMapping("/dictData/remove/{ids}") |
| | | public R remove(@PathVariable Long[] ids) { |
| | | if (!dictDataService.removeByIds(Arrays.asList(ids))) { |
| | | return R.error("Delete Fail"); |
| | | } |
| | | return R.ok("Delete Success").add(ids); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictData:list')") |
| | | @PostMapping("/dictData/query") |
| | | public R query(@RequestParam(required = false) String condition) { |
| | | List<KeyValVo> vos = new ArrayList<>(); |
| | | LambdaQueryWrapper<DictData> wrapper = new LambdaQueryWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(DictData::getId, condition); |
| | | } |
| | | dictDataService.page(new Page<>(1, 30), wrapper).getRecords().forEach( |
| | | item -> vos.add(new KeyValVo(item.getId(), item.getId())) |
| | | ); |
| | | return R.ok().add(vos); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictData:list')") |
| | | @PostMapping("/dictData/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(dictDataService.list(), DictData.class), response); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.system.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.server.common.utils.ExcelUtil; |
| | | import com.vincent.rsf.server.common.annotation.OperationLog; |
| | | import com.vincent.rsf.server.common.domain.BaseParam; |
| | | import com.vincent.rsf.server.common.domain.KeyValVo; |
| | | import com.vincent.rsf.server.common.domain.PageParam; |
| | | import com.vincent.rsf.server.system.entity.DictType; |
| | | import com.vincent.rsf.server.system.service.DictTypeService; |
| | | import com.vincent.rsf.server.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 |
| | | public class DictTypeController extends BaseController { |
| | | |
| | | @Autowired |
| | | private DictTypeService dictTypeService; |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictType:list')") |
| | | @PostMapping("/dictType/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<DictType, BaseParam> pageParam = new PageParam<>(baseParam, DictType.class); |
| | | return R.ok().add(dictTypeService.page(pageParam, pageParam.buildWrapper(true))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictType:list')") |
| | | @PostMapping("/dictType/list") |
| | | public R list(@RequestBody Map<String, Object> map) { |
| | | return R.ok().add(dictTypeService.list()); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictType:list')") |
| | | @PostMapping({"/dictType/many/{ids}", "/dictTypes/many/{ids}"}) |
| | | public R many(@PathVariable Long[] ids) { |
| | | return R.ok().add(dictTypeService.listByIds(Arrays.asList(ids))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictType:list')") |
| | | @GetMapping("/dictType/{id}") |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok().add(dictTypeService.getById(id)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictType:save')") |
| | | @OperationLog("Create 数据字典") |
| | | @PostMapping("/dictType/save") |
| | | public R save(@RequestBody DictType dictType) { |
| | | dictType.setCreateBy(getLoginUserId()); |
| | | dictType.setCreateTime(new Date()); |
| | | dictType.setUpdateBy(getLoginUserId()); |
| | | dictType.setUpdateTime(new Date()); |
| | | if (!dictTypeService.save(dictType)) { |
| | | return R.error("Save Fail"); |
| | | } |
| | | return R.ok("Save Success").add(dictType); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictType:update')") |
| | | @OperationLog("Update 数据字典") |
| | | @PostMapping("/dictType/update") |
| | | public R update(@RequestBody DictType dictType) { |
| | | dictType.setUpdateBy(getLoginUserId()); |
| | | dictType.setUpdateTime(new Date()); |
| | | if (!dictTypeService.updateById(dictType)) { |
| | | return R.error("Update Fail"); |
| | | } |
| | | return R.ok("Update Success").add(dictType); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictType:remove')") |
| | | @OperationLog("Delete 数据字典") |
| | | @PostMapping("/dictType/remove/{ids}") |
| | | public R remove(@PathVariable Long[] ids) { |
| | | if (!dictTypeService.removeByIds(Arrays.asList(ids))) { |
| | | return R.error("Delete Fail"); |
| | | } |
| | | return R.ok("Delete Success").add(ids); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictType:list')") |
| | | @PostMapping("/dictType/query") |
| | | public R query(@RequestParam(required = false) String condition) { |
| | | List<KeyValVo> vos = new ArrayList<>(); |
| | | LambdaQueryWrapper<DictType> wrapper = new LambdaQueryWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(DictType::getName, condition); |
| | | } |
| | | dictTypeService.page(new Page<>(1, 30), wrapper).getRecords().forEach( |
| | | item -> vos.add(new KeyValVo(item.getId(), item.getName())) |
| | | ); |
| | | return R.ok().add(vos); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:dictType:list')") |
| | | @PostMapping("/dictType/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(dictTypeService.list(), DictType.class), response); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.vincent.rsf.server.system.service.DictTypeService; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | 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.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.SpringUtils; |
| | | import com.vincent.rsf.server.system.service.UserService; |
| | | import com.vincent.rsf.server.system.entity.User; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("sys_dict_data") |
| | | public class DictData implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 字典ID |
| | | */ |
| | | @ApiModelProperty(value= "字典ID") |
| | | private String dictTypeId; |
| | | |
| | | /** |
| | | * 字典识别码 |
| | | */ |
| | | @ApiModelProperty(value= "字典识别码") |
| | | private String dictTypeCode; |
| | | |
| | | /** |
| | | * 值 |
| | | */ |
| | | @ApiModelProperty(value= "值") |
| | | private String value; |
| | | |
| | | /** |
| | | * 标签 |
| | | */ |
| | | @ApiModelProperty(value= "标签") |
| | | private String label; |
| | | |
| | | /** |
| | | * 排序 |
| | | */ |
| | | @ApiModelProperty(value= "排序") |
| | | private Integer sort; |
| | | |
| | | /** |
| | | * 颜色。例如:#FFFFFF、blue、rgba(0,0,0,0.5) |
| | | */ |
| | | @ApiModelProperty(value= "颜色。例如:#FFFFFF、blue、rgba(0,0,0,0.5)") |
| | | private String color; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 冻结 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 冻结 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @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 DictData() {} |
| | | |
| | | public DictData(String dictTypeId,String dictTypeCode,String value,String label,Integer sort,String color,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.dictTypeId = dictTypeId; |
| | | this.dictTypeCode = dictTypeCode; |
| | | this.value = value; |
| | | this.label = label; |
| | | this.sort = sort; |
| | | this.color = color; |
| | | this.status = status; |
| | | this.deleted = deleted; |
| | | this.tenantId = tenantId; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | // DictData dictData = new DictData( |
| | | // null, // 字典ID[非空] |
| | | // null, // 字典识别码[非空] |
| | | // null, // 值[非空] |
| | | // null, // 标签[非空] |
| | | // null, // 排序 |
| | | // null, // 颜色。例如:#FFFFFF、blue、rgba(0,0,0,0.5) |
| | | // null, // 状态[非空] |
| | | // null, // 是否删除[非空] |
| | | // null, // 租户 |
| | | // null, // 添加人员 |
| | | // null, // 添加时间[非空] |
| | | // null, // 修改人员 |
| | | // null, // 修改时间[非空] |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getDictTypeId$(){ |
| | | DictTypeService service = SpringUtils.getBean(DictTypeService.class); |
| | | DictType dictType = service.getById(this.dictTypeId); |
| | | if (!Cools.isEmpty(dictType)){ |
| | | return String.valueOf(dictType.getName()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | 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 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.vincent.rsf.server.system.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | 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.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.SpringUtils; |
| | | import com.vincent.rsf.server.system.service.UserService; |
| | | import com.vincent.rsf.server.system.entity.User; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("sys_dict_type") |
| | | public class DictType implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | private String uuid; |
| | | |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @ApiModelProperty(value= "名称") |
| | | private String name; |
| | | |
| | | /** |
| | | * 描述 |
| | | */ |
| | | @ApiModelProperty(value= "描述") |
| | | private String description; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 冻结 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 冻结 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 是否删除 1: 是 0: 否 |
| | | */ |
| | | @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 DictType() {} |
| | | |
| | | public DictType(String uuid,String name,String description,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.uuid = uuid; |
| | | this.name = name; |
| | | this.description = description; |
| | | this.status = status; |
| | | this.deleted = deleted; |
| | | this.tenantId = tenantId; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | // DictType dictType = new DictType( |
| | | // null, // 编号 |
| | | // null, // 名称 |
| | | // null, // 描述 |
| | | // null, // 状态[非空] |
| | | // null, // 是否删除[非空] |
| | | // null, // 租户 |
| | | // null, // 添加人员 |
| | | // null, // 添加时间[非空] |
| | | // null, // 修改人员 |
| | | // null, // 修改时间[非空] |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | 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 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.vincent.rsf.server.system.mapper; |
| | | |
| | | import com.vincent.rsf.server.system.entity.DictData; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface DictDataMapper extends BaseMapper<DictData> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.system.mapper; |
| | | |
| | | import com.vincent.rsf.server.system.entity.DictType; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface DictTypeMapper extends BaseMapper<DictType> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vincent.rsf.server.system.entity.DictData; |
| | | |
| | | public interface DictDataService extends IService<DictData> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vincent.rsf.server.system.entity.DictType; |
| | | |
| | | public interface DictTypeService extends IService<DictType> { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.system.service.impl; |
| | | |
| | | import com.vincent.rsf.server.system.mapper.DictDataMapper; |
| | | import com.vincent.rsf.server.system.entity.DictData; |
| | | import com.vincent.rsf.server.system.service.DictDataService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("dictDataService") |
| | | public class DictDataServiceImpl extends ServiceImpl<DictDataMapper, DictData> implements DictDataService { |
| | | |
| | | } |
New file |
| | |
| | | package com.vincent.rsf.server.system.service.impl; |
| | | |
| | | import com.vincent.rsf.server.system.mapper.DictTypeMapper; |
| | | import com.vincent.rsf.server.system.entity.DictType; |
| | | import com.vincent.rsf.server.system.service.DictTypeService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("dictTypeService") |
| | | public class DictTypeServiceImpl extends ServiceImpl<DictTypeMapper, DictType> implements DictTypeService { |
| | | |
| | | } |
New file |
| | |
| | | -- save dictData record |
| | | -- mysql |
| | | insert into `sys_menu` ( `name`, `parent_id`, `route`, `component`, `type`, `sort`, `tenant_id`, `status`) values ( 'menu.dictData', '0', '/system/dictData', 'dictData', '0' , '0', '1' , '1'); |
| | | |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Query 字典数据集', '113', '1', 'system:dictData:list', '0', '1', '1'); |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Create 字典数据集', '113', '1', 'system:dictData:save', '1', '1', '1'); |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Update 字典数据集', '113', '1', 'system:dictData:update', '2', '1', '1'); |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Delete 字典数据集', '113', '1', 'system:dictData:remove', '3', '1', '1'); |
| | | |
| | | -- locale menu name |
| | | dictData: 'DictData', |
| | | |
| | | -- locale field |
| | | dictData: { |
| | | dictTypeId: "dictTypeId", |
| | | dictTypeCode: "dictTypeCode", |
| | | value: "value", |
| | | label: "label", |
| | | sort: "sort", |
| | | color: "color", |
| | | }, |
| | | |
| | | -- ResourceContent |
| | | import dictData from './dictData'; |
| | | |
| | | case 'dictData': |
| | | return dictData; |
New file |
| | |
| | | -- save dictType record |
| | | -- mysql |
| | | insert into `sys_menu` ( `name`, `parent_id`, `route`, `component`, `type`, `sort`, `tenant_id`, `status`) values ( 'menu.dictType', '0', '/system/dictType', 'dictType', '0' , '0', '1' , '1'); |
| | | |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Query 数据字典', '108', '1', 'system:dictType:list', '0', '1', '1'); |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Create 数据字典', '108', '1', 'system:dictType:save', '1', '1', '1'); |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Update 数据字典', '108', '1', 'system:dictType:update', '2', '1', '1'); |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `tenant_id`, `status`) values ( 'Delete 数据字典', '108', '1', 'system:dictType:remove', '3', '1', '1'); |
| | | |
| | | -- locale menu name |
| | | dictType: 'DictType', |
| | | |
| | | -- locale field |
| | | dictType: { |
| | | uuid: "uuid", |
| | | name: "name", |
| | | description: "description", |
| | | }, |
| | | |
| | | -- ResourceContent |
| | | import dictType from './dictType'; |
| | | |
| | | case 'dictType': |
| | | return dictType; |
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.vincent.rsf.server.manager.mapper.DictTypeMapper"> |
| | | |
| | | </mapper> |
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.vincent.rsf.server.system.mapper.DictDataMapper"> |
| | | |
| | | </mapper> |
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.vincent.rsf.server.system.mapper.DictTypeMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | /* |
| | | Navicat Premium Data Transfer |
| | | |
| | | Source Server : localhost |
| | | Source Server Type : MySQL |
| | | Source Server Version : 80011 (8.0.11) |
| | | Source Host : localhost:3306 |
| | | Source Schema : fortec-bm |
| | | |
| | | Target Server Type : MySQL |
| | | Target Server Version : 80011 (8.0.11) |
| | | File Encoding : 65001 |
| | | |
| | | Date: 24/02/2025 08:45:02 |
| | | */ |
| | | |
| | | SET NAMES utf8mb4; |
| | | SET FOREIGN_KEY_CHECKS = 0; |
| | | |
| | | -- ---------------------------- |
| | | -- Table structure for sys_dict_data |
| | | -- ---------------------------- |
| | | DROP TABLE IF EXISTS `sys_dict_data`; |
| | | CREATE TABLE `sys_dict_data` ( |
| | | `id` bigint(20) NOT NULL COMMENT 'id', |
| | | `dict_type_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典ID', |
| | | `dict_type_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典识别码', |
| | | `value` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '值', |
| | | `label` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '标签', |
| | | `sort` int(11) DEFAULT NULL COMMENT '排序', |
| | | `color` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '颜色。例如:#FFFFFF、blue、rgba(0,0,0,0.5)', |
| | | `creator` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'creator', |
| | | `gmt_create` datetime DEFAULT NULL COMMENT 'gmt_create', |
| | | `modifier` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'modifier', |
| | | `gmt_modified` datetime DEFAULT NULL COMMENT 'gmt_modified', |
| | | PRIMARY KEY (`id`) USING BTREE, |
| | | KEY `IX__value` (`value`) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='字典字段表'; |
| | | |
| | | SET FOREIGN_KEY_CHECKS = 1; |
New file |
| | |
| | | /* |
| | | Navicat Premium Data Transfer |
| | | |
| | | Source Server : localhost |
| | | Source Server Type : MySQL |
| | | Source Server Version : 80011 (8.0.11) |
| | | Source Host : localhost:3306 |
| | | Source Schema : fortec-bm |
| | | |
| | | Target Server Type : MySQL |
| | | Target Server Version : 80011 (8.0.11) |
| | | File Encoding : 65001 |
| | | |
| | | Date: 24/02/2025 08:45:14 |
| | | */ |
| | | |
| | | SET NAMES utf8mb4; |
| | | SET FOREIGN_KEY_CHECKS = 0; |
| | | |
| | | -- ---------------------------- |
| | | -- Table structure for sys_dict_type |
| | | -- ---------------------------- |
| | | DROP TABLE IF EXISTS `sys_dict_type`; |
| | | CREATE TABLE `sys_dict_type` ( |
| | | `id` bigint(20) NOT NULL COMMENT 'id', |
| | | `code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '识别码', |
| | | `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典名称', |
| | | `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '描述', |
| | | `creator` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'creator', |
| | | `gmt_create` datetime DEFAULT NULL COMMENT 'gmt_create', |
| | | `modifier` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'modifier', |
| | | `gmt_modified` datetime DEFAULT NULL COMMENT 'gmt_modified', |
| | | PRIMARY KEY (`id`) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='字典表'; |
| | | |
| | | SET FOREIGN_KEY_CHECKS = 1; |