From 8d8a9f82e1fb979b44425d23c8b53f89a96f5266 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期三, 12 六月 2024 15:04:38 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/task/motionLog/components/edit.jsx | 305 +++++++++++
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/mapper/MotionLogMapper.java | 12
zy-asrs-wcs/src/main/resources/mapper/core/MotionLogMapper.xml | 5
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/MotionLogService.java | 8
zy-asrs-flow/src/pages/task/motionLog/index.jsx | 695 +++++++++++++++++++++++++
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/entity/MotionLog.java | 449 ++++++++++++++++
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/MotionLogServiceImpl.java | 12
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/controller/MotionLogController.java | 101 +++
8 files changed, 1,587 insertions(+), 0 deletions(-)
diff --git a/zy-asrs-flow/src/pages/task/motionLog/components/edit.jsx b/zy-asrs-flow/src/pages/task/motionLog/components/edit.jsx
new file mode 100644
index 0000000..5761756
--- /dev/null
+++ b/zy-asrs-flow/src/pages/task/motionLog/components/edit.jsx
@@ -0,0 +1,305 @@
+import React, { useState, useRef, useEffect } from 'react';
+import {
+ ProForm,
+ ProFormDigit,
+ ProFormText,
+ ProFormSelect,
+ ProFormDateTimePicker
+} from '@ant-design/pro-components';
+import { Form, Modal } from 'antd';
+import { FormattedMessage, useIntl } from '@umijs/max';
+import moment from 'moment';
+import Http from '@/utils/http';
+
+const Edit = (props) => {
+ const intl = useIntl();
+ const [form] = Form.useForm();
+ const { } = props;
+
+ useEffect(() => {
+ form.resetFields();
+ form.setFieldsValue({
+ ...props.values
+ })
+ }, [form, props])
+
+ const handleCancel = () => {
+ props.onCancel();
+ };
+
+ const handleOk = () => {
+ form.submit();
+ }
+
+ const handleFinish = async (values) => {
+ props.onSubmit({ ...values });
+ }
+
+ return (
+ <>
+ <Modal
+ title={
+ Object.keys(props.values).length > 0
+ ? intl.formatMessage({ id: 'page.edit', defaultMessage: '缂栬緫' })
+ : intl.formatMessage({ id: 'page.add', defaultMessage: '娣诲姞' })
+ }
+ width={640}
+ forceRender
+ destroyOnClose
+ open={props.open}
+ onCancel={handleCancel}
+ onOk={handleOk}
+ >
+ <ProForm
+ form={form}
+ submitter={false}
+ onFinish={handleFinish}
+ layout="horizontal"
+ grid={true}
+ >
+ <ProFormDigit
+ name="id"
+ disabled
+ hidden={true}
+ />
+ <ProForm.Group>
+ <ProFormText
+ name="uuid"
+ label="缂栧彿"
+ colProps={{ md: 12, xl: 12 }}
+ />
+ <ProFormDigit
+ name="taskNo"
+ label="浠诲姟鍙�"
+ colProps={{ md: 12, xl: 12 }}
+ fieldProps={{ precision: 0 }}
+ />
+ </ProForm.Group>
+ <ProForm.Group>
+ <ProFormText
+ name="serialNo"
+ label="搴忓垪鍙�"
+ colProps={{ md: 12, xl: 12 }}
+ />
+ <ProFormText
+ name="title"
+ label="鎻忚堪"
+ colProps={{ md: 12, xl: 12 }}
+ />
+ </ProForm.Group>
+ <ProForm.Group>
+ <ProFormDigit
+ name="priority"
+ label="浼樺厛绾�"
+ colProps={{ md: 12, xl: 12 }}
+ fieldProps={{ precision: 0 }}
+ />
+ <ProFormSelect
+ name="sync"
+ label="鍚屾"
+ colProps={{ md: 12, xl: 12 }}
+ rules={[{ required: true }]}
+ options={[
+ { label: '鏄�', value: 1 },
+ { label: '鍚�', value: 0 },
+ ]}
+ />
+ </ProForm.Group>
+ <ProForm.Group>
+ <ProFormSelect
+ name="motionCtg"
+ label="浠诲姟绫诲瀷"
+ colProps={{ md: 12, xl: 12 }}
+ fieldProps={{ precision: 0 }}
+ rules={[{ required: true }]}
+ showSearch
+ debounceTime={300}
+ request={async ({ keyWords }) => {
+ const resp = await Http.doPostForm('api/motionCtg/query', { condition: keyWords });
+ return resp.data;
+ }}
+ />
+ <ProFormSelect
+ name="motionSts"
+ label="浠诲姟鐘舵��"
+ colProps={{ md: 12, xl: 12 }}
+ fieldProps={{ precision: 0 }}
+ rules={[{ required: true }]}
+ showSearch
+ debounceTime={300}
+ request={async ({ keyWords }) => {
+ const resp = await Http.doPostForm('api/motionSts/query', { condition: keyWords });
+ return resp.data;
+ }}
+ />
+ </ProForm.Group>
+ <ProForm.Group>
+ <ProFormSelect
+ name="deviceCtg"
+ label="璁惧绫诲瀷"
+ colProps={{ md: 12, xl: 12 }}
+ fieldProps={{ precision: 0 }}
+ showSearch
+ debounceTime={300}
+ request={async ({ keyWords }) => {
+ const resp = await Http.doPostForm('api/deviceType/query', { condition: keyWords });
+ return resp.data;
+ }}
+ />
+ <ProFormText
+ name="device"
+ label="璁惧"
+ colProps={{ md: 12, xl: 12 }}
+ />
+ </ProForm.Group>
+ <ProForm.Group>
+ <ProFormText
+ name="origin"
+ label="鏉ユ簮"
+ colProps={{ md: 12, xl: 12 }}
+ />
+ <ProFormDigit
+ name="oriDrt"
+ label="鏉ユ簮鏂瑰悜"
+ colProps={{ md: 12, xl: 12 }}
+ fieldProps={{ precision: 0 }}
+ />
+ </ProForm.Group>
+ <ProForm.Group>
+ <ProFormText
+ name="target"
+ label="鐩爣"
+ colProps={{ md: 12, xl: 12 }}
+ />
+ <ProFormDigit
+ name="tarDrt"
+ label="鐩爣鏂瑰悜"
+ colProps={{ md: 12, xl: 12 }}
+ fieldProps={{ precision: 0 }}
+ />
+ </ProForm.Group>
+ <ProForm.Group>
+ <ProFormText
+ name="dockNo"
+ label="瀵规帴璁惧"
+ colProps={{ md: 12, xl: 12 }}
+ />
+ <ProFormDateTimePicker
+ name="ioTime"
+ label="宸ヤ綔鏃堕棿"
+ colProps={{ md: 12, xl: 12 }}
+ transform={(value) => moment(value).toISOString()}
+ />
+ </ProForm.Group>
+ <ProForm.Group>
+ <ProFormDateTimePicker
+ name="startTime"
+ label="寮�濮嬫椂闂�"
+ colProps={{ md: 12, xl: 12 }}
+ transform={(value) => moment(value).toISOString()}
+ />
+ <ProFormDateTimePicker
+ name="endTime"
+ label="缁撴潫鏃堕棿"
+ colProps={{ md: 12, xl: 12 }}
+ transform={(value) => moment(value).toISOString()}
+ />
+ </ProForm.Group>
+ <ProForm.Group>
+ <ProFormDateTimePicker
+ name="errTime"
+ label="寮傚父鏃堕棿"
+ colProps={{ md: 12, xl: 12 }}
+ transform={(value) => moment(value).toISOString()}
+ />
+ <ProFormDigit
+ name="errCode"
+ label="寮傚父浠g爜"
+ colProps={{ md: 12, xl: 12 }}
+ fieldProps={{ precision: 0 }}
+ />
+ </ProForm.Group>
+ <ProForm.Group>
+ <ProFormText
+ name="errDesc"
+ label="寮傚父鎻忚堪"
+ colProps={{ md: 12, xl: 12 }}
+ />
+ <ProFormText
+ name="temp"
+ label="棰勭暀"
+ colProps={{ md: 12, xl: 12 }}
+ />
+ </ProForm.Group>
+ <ProForm.Group>
+ <ProFormSelect
+ name="status"
+ label="鐘舵��"
+ colProps={{ md: 12, xl: 12 }}
+ options={[
+ { label: '姝e父', value: 1 },
+ { label: '绂佺敤', value: 0 },
+ ]}
+ />
+ <ProFormSelect
+ name="createBy"
+ label="娣诲姞浜哄憳"
+ colProps={{ md: 12, xl: 12 }}
+ fieldProps={{ precision: 0 }}
+ showSearch
+ debounceTime={300}
+ request={async ({ keyWords }) => {
+ const resp = await Http.doPostForm('api/user/query', { condition: keyWords });
+ return resp.data;
+ }}
+ />
+ </ProForm.Group>
+ <ProForm.Group>
+ <ProFormDateTimePicker
+ name="createTime"
+ label="娣诲姞鏃堕棿"
+ colProps={{ md: 12, xl: 12 }}
+ transform={(value) => moment(value).toISOString()}
+ />
+ <ProFormSelect
+ name="updateBy"
+ label="淇敼浜哄憳"
+ colProps={{ md: 12, xl: 12 }}
+ fieldProps={{ precision: 0 }}
+ showSearch
+ debounceTime={300}
+ request={async ({ keyWords }) => {
+ const resp = await Http.doPostForm('api/user/query', { condition: keyWords });
+ return resp.data;
+ }}
+ />
+ </ProForm.Group>
+ <ProForm.Group>
+ <ProFormDateTimePicker
+ name="updateTime"
+ label="淇敼鏃堕棿"
+ colProps={{ md: 12, xl: 12 }}
+ transform={(value) => moment(value).toISOString()}
+ />
+ <ProFormText
+ name="memo"
+ label="澶囨敞"
+ colProps={{ md: 12, xl: 12 }}
+ />
+ </ProForm.Group>
+ <ProForm.Group>
+ <ProFormDigit
+ name="deviceTaskNo"
+ label="璁惧宸ヤ綔鍙�"
+ colProps={{ md: 12, xl: 12 }}
+ fieldProps={{ precision: 0 }}
+ />
+ </ProForm.Group>
+
+ </ProForm>
+ </Modal>
+ </>
+ )
+}
+
+export default Edit;
diff --git a/zy-asrs-flow/src/pages/task/motionLog/index.jsx b/zy-asrs-flow/src/pages/task/motionLog/index.jsx
new file mode 100644
index 0000000..f4ef30a
--- /dev/null
+++ b/zy-asrs-flow/src/pages/task/motionLog/index.jsx
@@ -0,0 +1,695 @@
+
+import React, { useState, useRef, useEffect } from 'react';
+import { Button, message, Modal, Tag } from 'antd';
+import {
+ FooterToolbar,
+ PageContainer,
+ ProTable,
+ LightFilter,
+} from '@ant-design/pro-components';
+import { FormattedMessage, useIntl } from '@umijs/max';
+import { PlusOutlined, ExportOutlined } from '@ant-design/icons';
+import Http from '@/utils/http';
+import Edit from './components/edit'
+import { TextFilter, SelectFilter, DatetimeRangeFilter, LinkFilter } from '@/components/TableSearch'
+import { statusMap } from '@/utils/enum-util'
+import { repairBug } from '@/utils/common-util';
+
+const TABLE_KEY = 'pro-table-motionLog';
+
+const handleSave = async (val, intl) => {
+ const hide = message.loading(intl.formatMessage({ id: 'page.adding', defaultMessage: '姝e湪娣诲姞' }));
+ try {
+ const resp = await Http.doPost('api/motionLog/save', val);
+ if (resp.code === 200) {
+ message.success(intl.formatMessage({ id: 'page.add.success', defaultMessage: '娣诲姞鎴愬姛' }));
+ return true;
+ } else {
+ message.error(resp.msg);
+ return false;
+ }
+ } catch (error) {
+ message.error(intl.formatMessage({ id: 'page.add.fail', defaultMessage: '娣诲姞澶辫触璇烽噸璇曪紒' }));
+ return false;
+ } finally {
+ hide();
+ }
+};
+
+const handleUpdate = async (val, intl) => {
+ const hide = message.loading(intl.formatMessage({ id: 'page.updating', defaultMessage: '姝e湪鏇存柊' }));
+ try {
+ const resp = await Http.doPost('api/motionLog/update', val);
+ if (resp.code === 200) {
+ message.success(intl.formatMessage({ id: 'page.update.success', defaultMessage: '鏇存柊鎴愬姛' }));
+ return true;
+ } else {
+ message.error(resp.msg);
+ return false;
+ }
+ } catch (error) {
+ message.error(intl.formatMessage({ id: 'page.update.fail', defaultMessage: '鏇存柊澶辫触璇烽噸璇曪紒' }));
+ return false;
+ } finally {
+ hide();
+ }
+};
+
+const handleRemove = async (rows, intl) => {
+ if (!rows) return true;
+ const hide = message.loading(intl.formatMessage({ id: 'page.deleting', defaultMessage: '姝e湪鍒犻櫎' }));
+ try {
+ const resp = await Http.doPost('api/motionLog/remove/' + rows.map((row) => row.id).join(','));
+ if (resp.code === 200) {
+ message.success(intl.formatMessage({ id: 'page.delete.success', defaultMessage: '鍒犻櫎鎴愬姛' }));
+ return true;
+ } else {
+ message.error(resp.msg);
+ return false;
+ }
+ } catch (error) {
+ message.error(intl.formatMessage({ id: 'page.delete.fail', defaultMessage: '鍒犻櫎澶辫触锛岃閲嶈瘯锛�' }));
+ return false;
+ } finally {
+ hide();
+ }
+};
+
+const handleExport = async (intl) => {
+ const hide = message.loading(intl.formatMessage({ id: 'page.exporting', defaultMessage: '姝e湪瀵煎嚭' }));
+ try {
+ const resp = await Http.doPostBlob('api/motionLog/export');
+ const blob = new Blob([resp], { type: 'application/vnd.ms-excel' });
+ window.location.href = window.URL.createObjectURL(blob);
+ message.success(intl.formatMessage({ id: 'page.export.success', defaultMessage: '瀵煎嚭鎴愬姛' }));
+ return true;
+ } catch (error) {
+ message.error(intl.formatMessage({ id: 'page.export.fail', defaultMessage: '瀵煎嚭澶辫触锛岃閲嶈瘯' }));
+ return false;
+ } finally {
+ hide();
+ }
+};
+
+
+const Main = () => {
+ const intl = useIntl();
+ const formTableRef = useRef();
+ const actionRef = useRef();
+ const [selectedRows, setSelectedRows] = useState([]);
+ const [modalVisible, setModalVisible] = useState(false);
+ const [currentRow, setCurrentRow] = useState();
+ const [searchParam, setSearchParam] = useState({});
+
+ useEffect(() => {
+
+ }, []);
+
+ const columns = [
+ {
+ title: intl.formatMessage({
+ id: 'page.table.no',
+ defaultMessage: 'No'
+ }),
+ dataIndex: 'index',
+ valueType: 'indexBorder',
+ width: 48,
+ },
+ {
+ title: '缂栧彿',
+ dataIndex: 'uuid',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <TextFilter
+ name='uuid'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '浠诲姟鍙�',
+ dataIndex: 'taskNo',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <TextFilter
+ name='taskNo'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '搴忓垪鍙�',
+ dataIndex: 'serialNo',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ copyable: true,
+ filterDropdown: (props) => <TextFilter
+ name='serialNo'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '鎻忚堪',
+ dataIndex: 'title',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <TextFilter
+ name='title'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '浼樺厛绾�',
+ dataIndex: 'priority',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <TextFilter
+ name='priority'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '鍚屾',
+ dataIndex: 'sync$',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <SelectFilter
+ name='sync'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ data={[
+ { label: '鏄�', value: 1 },
+ { label: '鍚�', value: 0 },
+ ]}
+ />,
+ },
+ {
+ title: '浠诲姟绫诲瀷',
+ dataIndex: 'motionCtg$',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <LinkFilter
+ name='motionCtg'
+ major='motionCtg'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '浠诲姟鐘舵��',
+ dataIndex: 'motionSts$',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <LinkFilter
+ name='motionSts'
+ major='motionSts'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '璁惧绫诲瀷',
+ dataIndex: 'deviceCtg$',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <LinkFilter
+ name='deviceCtg'
+ major='deviceType'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '璁惧',
+ dataIndex: 'device',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <TextFilter
+ name='device'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '鏉ユ簮',
+ dataIndex: 'origin',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <TextFilter
+ name='origin'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '鏉ユ簮鏂瑰悜',
+ dataIndex: 'oriDrt',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <TextFilter
+ name='oriDrt'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '鐩爣',
+ dataIndex: 'target',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <TextFilter
+ name='target'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '鐩爣鏂瑰悜',
+ dataIndex: 'tarDrt',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <TextFilter
+ name='tarDrt'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '瀵规帴璁惧',
+ dataIndex: 'dockNo',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <TextFilter
+ name='dockNo'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '宸ヤ綔鏃堕棿',
+ dataIndex: 'ioTime$',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <DatetimeRangeFilter
+ name='ioTime'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '寮�濮嬫椂闂�',
+ dataIndex: 'startTime$',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <DatetimeRangeFilter
+ name='startTime'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '缁撴潫鏃堕棿',
+ dataIndex: 'endTime$',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <DatetimeRangeFilter
+ name='endTime'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '寮傚父鏃堕棿',
+ dataIndex: 'errTime$',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <DatetimeRangeFilter
+ name='errTime'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '寮傚父浠g爜',
+ dataIndex: 'errCode',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <TextFilter
+ name='errCode'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '寮傚父鎻忚堪',
+ dataIndex: 'errDesc',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <TextFilter
+ name='errDesc'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '棰勭暀',
+ dataIndex: 'temp',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <TextFilter
+ name='temp'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '鐘舵��',
+ dataIndex: 'status$',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <SelectFilter
+ name='status'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ data={[
+ { label: '姝e父', value: 1 },
+ { label: '绂佺敤', value: 0 },
+ ]}
+ />,
+ },
+ {
+ title: '娣诲姞浜哄憳',
+ dataIndex: 'createBy$',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <LinkFilter
+ name='createBy'
+ major='user'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '娣诲姞鏃堕棿',
+ dataIndex: 'createTime$',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <DatetimeRangeFilter
+ name='createTime'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '淇敼浜哄憳',
+ dataIndex: 'updateBy$',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <LinkFilter
+ name='updateBy'
+ major='user'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '淇敼鏃堕棿',
+ dataIndex: 'updateTime$',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <DatetimeRangeFilter
+ name='updateTime'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '澶囨敞',
+ dataIndex: 'memo',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <TextFilter
+ name='memo'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '璁惧宸ヤ綔鍙�',
+ dataIndex: 'deviceTaskNo',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <TextFilter
+ name='deviceTaskNo'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+
+ {
+ title: '鎿嶄綔',
+ dataIndex: 'option',
+ width: 140,
+ valueType: 'option',
+ render: (_, record) => [
+ <Button
+ type="link"
+ key="edit"
+ onClick={() => {
+ setModalVisible(true);
+ setCurrentRow(record);
+ }}
+ >
+ <FormattedMessage id='page.edit' defaultMessage='缂栬緫' />
+ </Button>,
+ <Button
+ type="link"
+ danger
+ key="batchRemove"
+ onClick={async () => {
+ Modal.confirm({
+ title: intl.formatMessage({ id: 'page.delete', defaultMessage: '鍒犻櫎' }),
+ content: intl.formatMessage({ id: 'page.delete.confirm', defaultMessage: '纭畾鍒犻櫎璇ラ」鍚楋紵' }),
+ onOk: async () => {
+ const success = await handleRemove([record], intl);
+ if (success) {
+ if (actionRef.current) {
+ actionRef.current.reload();
+ }
+ }
+ },
+ });
+ }}
+ >
+ <FormattedMessage id='page.delete' defaultMessage='鍒犻櫎' />
+ </Button>,
+ ],
+ },
+ ];
+
+ return (
+ <PageContainer
+ header={{
+ breadcrumb: {},
+ }}
+ >
+ <div style={{ width: '100%', float: 'right' }}>
+ <ProTable
+ key="motionLog"
+ rowKey="id"
+ actionRef={actionRef}
+ formRef={formTableRef}
+ columns={columns}
+ cardBordered
+ scroll={{ x: 1300 }}
+ dateFormatter="string"
+ pagination={{ pageSize: 16 }}
+ search={false}
+ toolbar={{
+ search: {
+ onSearch: (value) => {
+ setSearchParam(prevState => ({
+ ...prevState,
+ condition: value
+ }));
+ actionRef.current?.reload();
+ },
+ },
+ filter: (
+ <LightFilter
+ onValuesChange={(val) => {
+ }}
+ >
+ </LightFilter>
+ ),
+ actions: [
+ <Button
+ type="primary"
+ key="save"
+ onClick={async () => {
+ setModalVisible(true)
+ }}
+ >
+ <PlusOutlined />
+ <FormattedMessage id='page.add' defaultMessage='娣诲姞' />
+ </Button>,
+ <Button
+ key="export"
+ onClick={async () => {
+ handleExport(intl);
+ }}
+ >
+ <ExportOutlined />
+ <FormattedMessage id='page.export' defaultMessage='瀵煎嚭' />
+ </Button>,
+ ],
+ }}
+ request={(params, sorter, filter) =>
+ Http.doPostPromise('/api/motionLog/page', { ...params, ...searchParam }, (res) => {
+ return {
+ data: res.data.records,
+ total: res.data.total,
+ success: true,
+ }
+ })
+ }
+ rowSelection={{
+ onChange: (ids, rows) => {
+ setSelectedRows(rows);
+ }
+ }}
+ columnsState={{
+ persistenceKey: TABLE_KEY,
+ persistenceType: 'localStorage',
+ defaultValue: {
+ // memo: { show: repairBug(TABLE_KEY, 'memo', false) },
+ option: { fixed: 'right', disable: true },
+ },
+ onChange(value) {
+ },
+ }}
+ />
+ </div>
+
+ {selectedRows?.length > 0 && (
+ <FooterToolbar
+ extra={
+ <div>
+ <a style={{ fontWeight: 600 }}>{selectedRows.length}</a>
+ <FormattedMessage id='page.selected' defaultMessage=' 椤瑰凡閫夋嫨' />
+ </div>
+ }
+ >
+ <Button
+ key="remove"
+ danger
+ onClick={async () => {
+ Modal.confirm({
+ title: intl.formatMessage({ id: 'page.delete', defaultMessage: '鍒犻櫎' }),
+ content: intl.formatMessage({ id: 'page.delete.confirm', defaultMessage: '纭畾鍒犻櫎璇ラ」鍚楋紵' }),
+ onOk: async () => {
+ const success = await handleRemove(selectedRows, intl);
+ if (success) {
+ setSelectedRows([]);
+ actionRef.current?.reloadAndRest?.();
+ }
+ },
+ });
+ }}
+ >
+ <FormattedMessage id='page.delete.batch' defaultMessage='鎵归噺鍒犻櫎' />
+ </Button>
+ </FooterToolbar>
+ )}
+
+ <Edit
+ open={modalVisible}
+ values={currentRow || {}}
+ onCancel={
+ () => {
+ setModalVisible(false);
+ setCurrentRow(undefined);
+ }
+ }
+ onSubmit={async (values) => {
+ let ok = false;
+ if (values.id) {
+ ok = await handleUpdate({ ...values }, intl)
+ } else {
+ ok = await handleSave({ ...values }, intl)
+ }
+ if (ok) {
+ setModalVisible(false);
+ setCurrentRow(undefined);
+ if (actionRef.current) {
+ actionRef.current.reload();
+ }
+ }
+ }}
+ />
+ </PageContainer>
+ );
+};
+
+export default Main;
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/controller/MotionLogController.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/controller/MotionLogController.java
new file mode 100644
index 0000000..73f248a
--- /dev/null
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/controller/MotionLogController.java
@@ -0,0 +1,101 @@
+package com.zy.asrs.wcs.system.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.zy.asrs.framework.common.Cools;
+import com.zy.asrs.framework.common.R;
+import com.zy.asrs.wcs.common.annotation.OperationLog;
+import com.zy.asrs.wcs.common.domain.BaseParam;
+import com.zy.asrs.wcs.common.domain.KeyValVo;
+import com.zy.asrs.wcs.common.domain.PageParam;
+import com.zy.asrs.wcs.core.entity.MotionLog;
+import com.zy.asrs.wcs.core.service.MotionLogService;
+import com.zy.asrs.wcs.utils.ExcelUtil;
+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.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+@RestController
+@RequestMapping("/api")
+public class MotionLogController extends BaseController {
+
+ @Autowired
+ private MotionLogService motionLogService;
+
+ @PreAuthorize("hasAuthority('core:motionLog:list')")
+ @PostMapping("/motionLog/page")
+ public R page(@RequestBody Map<String, Object> map) {
+ BaseParam baseParam = buildParam(map, BaseParam.class);
+ PageParam<MotionLog, BaseParam> pageParam = new PageParam<>(baseParam, MotionLog.class);
+ return R.ok().add(motionLogService.page(pageParam, pageParam.buildWrapper(true)));
+ }
+
+ @PreAuthorize("hasAuthority('core:motionLog:list')")
+ @PostMapping("/motionLog/list")
+ public R list(@RequestBody Map<String, Object> map) {
+ return R.ok().add(motionLogService.list());
+ }
+
+ @PreAuthorize("hasAuthority('core:motionLog:list')")
+ @GetMapping("/motionLog/{id}")
+ public R get(@PathVariable("id") Long id) {
+ return R.ok().add(motionLogService.getById(id));
+ }
+
+ @PreAuthorize("hasAuthority('core:motionLog:save')")
+ @OperationLog("娣诲姞鍔ㄤ綔鍘嗗彶鍒楄〃")
+ @PostMapping("/motionLog/save")
+ public R save(@RequestBody MotionLog motionLog) {
+ if (!motionLogService.save(motionLog)) {
+ return R.error("娣诲姞澶辫触");
+ }
+ return R.ok("娣诲姞鎴愬姛");
+ }
+
+ @PreAuthorize("hasAuthority('core:motionLog:update')")
+ @OperationLog("淇敼鍔ㄤ綔鍘嗗彶鍒楄〃")
+ @PostMapping("/motionLog/update")
+ public R update(@RequestBody MotionLog motionLog) {
+ if (!motionLogService.updateById(motionLog)) {
+ return R.error("淇敼澶辫触");
+ }
+ return R.ok("淇敼鎴愬姛");
+ }
+
+ @PreAuthorize("hasAuthority('core:motionLog:remove')")
+ @OperationLog("鍒犻櫎鍔ㄤ綔鍘嗗彶鍒楄〃")
+ @PostMapping("/motionLog/remove/{ids}")
+ public R remove(@PathVariable Long[] ids) {
+ if (!motionLogService.removeByIds(Arrays.asList(ids))) {
+ return R.error("鍒犻櫎澶辫触");
+ }
+ return R.ok("鍒犻櫎鎴愬姛");
+ }
+
+ @PreAuthorize("hasAuthority('core:motionLog:list')")
+ @PostMapping("/motionLog/query")
+ public R query(@RequestParam(required = false) String condition) {
+ List<KeyValVo> vos = new ArrayList<>();
+ LambdaQueryWrapper<MotionLog> wrapper = new LambdaQueryWrapper<>();
+ if (!Cools.isEmpty(condition)) {
+ wrapper.like(MotionLog::getSerialNo, condition);
+ }
+ motionLogService.page(new Page<>(1, 30), wrapper).getRecords().forEach(
+ item -> vos.add(new KeyValVo(item.getId(), item.getSerialNo()))
+ );
+ return R.ok().add(vos);
+ }
+
+ @PreAuthorize("hasAuthority('core:motionLog:list')")
+ @PostMapping("/motionLog/export")
+ public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception {
+ ExcelUtil.build(ExcelUtil.create(motionLogService.list(), MotionLog.class), response);
+ }
+
+}
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/entity/MotionLog.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/entity/MotionLog.java
new file mode 100644
index 0000000..e7d79c4
--- /dev/null
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/entity/MotionLog.java
@@ -0,0 +1,449 @@
+package com.zy.asrs.wcs.core.entity;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import com.zy.asrs.wcs.core.service.MotionCtgService;
+import com.zy.asrs.wcs.core.service.MotionStsService;
+import com.zy.asrs.wcs.rcs.entity.DeviceType;
+import com.zy.asrs.wcs.rcs.service.DeviceTypeService;
+import com.zy.asrs.wcs.system.entity.Host;
+import com.zy.asrs.wcs.system.entity.User;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+
+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.zy.asrs.framework.common.Cools;
+import com.zy.asrs.framework.common.SpringUtils;
+import com.zy.asrs.wcs.system.service.UserService;
+import com.zy.asrs.wcs.system.service.HostService;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@TableName("rcs_motion_log")
+public class MotionLog 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 Integer taskNo;
+
+ /**
+ * 搴忓垪鍙�
+ */
+ @ApiModelProperty(value= "搴忓垪鍙�")
+ private String serialNo;
+
+ /**
+ * 鎻忚堪
+ */
+ @ApiModelProperty(value= "鎻忚堪")
+ private String title;
+
+ /**
+ * 浼樺厛绾�
+ */
+ @ApiModelProperty(value= "浼樺厛绾�")
+ private Integer priority;
+
+ /**
+ * 鍚屾 1: 鏄� 0: 鍚�
+ */
+ @ApiModelProperty(value= "鍚屾 1: 鏄� 0: 鍚� ")
+ private Integer sync;
+
+ /**
+ * 浠诲姟绫诲瀷
+ */
+ @ApiModelProperty(value= "浠诲姟绫诲瀷")
+ private Long motionCtg;
+
+ /**
+ * 浠诲姟鐘舵��
+ */
+ @ApiModelProperty(value= "浠诲姟鐘舵��")
+ private Long motionSts;
+
+ /**
+ * 璁惧绫诲瀷
+ */
+ @ApiModelProperty(value= "璁惧绫诲瀷")
+ private Long deviceCtg;
+
+ /**
+ * 璁惧
+ */
+ @ApiModelProperty(value= "璁惧")
+ private String device;
+
+ /**
+ * 鏉ユ簮
+ */
+ @ApiModelProperty(value= "鏉ユ簮")
+ private String origin;
+
+ /**
+ * 鏉ユ簮鏂瑰悜
+ */
+ @ApiModelProperty(value= "鏉ユ簮鏂瑰悜")
+ private Integer oriDrt;
+
+ /**
+ * 鐩爣
+ */
+ @ApiModelProperty(value= "鐩爣")
+ private String target;
+
+ /**
+ * 鐩爣鏂瑰悜
+ */
+ @ApiModelProperty(value= "鐩爣鏂瑰悜")
+ private Integer tarDrt;
+
+ /**
+ * 瀵规帴璁惧
+ */
+ @ApiModelProperty(value= "瀵规帴璁惧")
+ private String dockNo;
+
+ /**
+ * 宸ヤ綔鏃堕棿
+ */
+ @ApiModelProperty(value= "宸ヤ綔鏃堕棿")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ private Date ioTime;
+
+ /**
+ * 寮�濮嬫椂闂�
+ */
+ @ApiModelProperty(value= "寮�濮嬫椂闂�")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ private Date startTime;
+
+ /**
+ * 缁撴潫鏃堕棿
+ */
+ @ApiModelProperty(value= "缁撴潫鏃堕棿")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ private Date endTime;
+
+ /**
+ * 寮傚父鏃堕棿
+ */
+ @ApiModelProperty(value= "寮傚父鏃堕棿")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ private Date errTime;
+
+ /**
+ * 寮傚父浠g爜
+ */
+ @ApiModelProperty(value= "寮傚父浠g爜")
+ private Long errCode;
+
+ /**
+ * 寮傚父鎻忚堪
+ */
+ @ApiModelProperty(value= "寮傚父鎻忚堪")
+ private String errDesc;
+
+ /**
+ * 棰勭暀
+ */
+ @ApiModelProperty(value= "棰勭暀")
+ private String temp;
+
+ /**
+ * 鐘舵�� 1: 姝e父 0: 绂佺敤
+ */
+ @ApiModelProperty(value= "鐘舵�� 1: 姝e父 0: 绂佺敤 ")
+ private Integer status;
+
+ /**
+ * 娣诲姞浜哄憳
+ */
+ @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;
+
+ /**
+ * 鏄惁鍒犻櫎 1: 鏄� 0: 鍚�
+ */
+ @ApiModelProperty(value= "鏄惁鍒犻櫎 1: 鏄� 0: 鍚� ")
+ @TableLogic
+ private Integer deleted;
+
+ /**
+ * 鎵�灞炴満鏋�
+ */
+ @ApiModelProperty(value= "鎵�灞炴満鏋�")
+ private Long hostId;
+
+ /**
+ * 璁惧宸ヤ綔鍙�
+ */
+ @ApiModelProperty(value= "璁惧宸ヤ綔鍙�")
+ private Integer deviceTaskNo;
+
+ public MotionLog() {}
+
+ public MotionLog(String uuid,Integer taskNo,String serialNo,String title,Integer priority,Integer sync,Long motionCtg,Long motionSts,Long deviceCtg,String device,String origin,Integer oriDrt,String target,Integer tarDrt,String dockNo,Date ioTime,Date startTime,Date endTime,Date errTime,Long errCode,String errDesc,String temp,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo,Integer deleted,Long hostId,Integer deviceTaskNo) {
+ this.uuid = uuid;
+ this.taskNo = taskNo;
+ this.serialNo = serialNo;
+ this.title = title;
+ this.priority = priority;
+ this.sync = sync;
+ this.motionCtg = motionCtg;
+ this.motionSts = motionSts;
+ this.deviceCtg = deviceCtg;
+ this.device = device;
+ this.origin = origin;
+ this.oriDrt = oriDrt;
+ this.target = target;
+ this.tarDrt = tarDrt;
+ this.dockNo = dockNo;
+ this.ioTime = ioTime;
+ this.startTime = startTime;
+ this.endTime = endTime;
+ this.errTime = errTime;
+ this.errCode = errCode;
+ this.errDesc = errDesc;
+ this.temp = temp;
+ this.status = status;
+ this.createBy = createBy;
+ this.createTime = createTime;
+ this.updateBy = updateBy;
+ this.updateTime = updateTime;
+ this.memo = memo;
+ this.deleted = deleted;
+ this.hostId = hostId;
+ this.deviceTaskNo = deviceTaskNo;
+ }
+
+// MotionLog motionLog = new MotionLog(
+// null, // 缂栧彿
+// null, // 浠诲姟鍙�
+// null, // 搴忓垪鍙�
+// null, // 鎻忚堪
+// null, // 浼樺厛绾�
+// null, // 鍚屾[闈炵┖]
+// null, // 浠诲姟绫诲瀷[闈炵┖]
+// null, // 浠诲姟鐘舵�乕闈炵┖]
+// null, // 璁惧绫诲瀷
+// null, // 璁惧
+// null, // 鏉ユ簮
+// null, // 鏉ユ簮鏂瑰悜
+// null, // 鐩爣
+// null, // 鐩爣鏂瑰悜
+// null, // 瀵规帴璁惧
+// null, // 宸ヤ綔鏃堕棿
+// null, // 寮�濮嬫椂闂�
+// null, // 缁撴潫鏃堕棿
+// null, // 寮傚父鏃堕棿
+// null, // 寮傚父浠g爜
+// null, // 寮傚父鎻忚堪
+// null, // 棰勭暀
+// null, // 鐘舵��
+// null, // 娣诲姞浜哄憳
+// null, // 娣诲姞鏃堕棿
+// null, // 淇敼浜哄憳
+// null, // 淇敼鏃堕棿
+// null, // 澶囨敞
+// null, // 鏄惁鍒犻櫎
+// null, // 鎵�灞炴満鏋�
+// null // 璁惧宸ヤ綔鍙�
+// );
+
+ public String getSync$(){
+ if (null == this.sync){ return null; }
+ switch (this.sync){
+ case 1:
+ return "鏄�";
+ case 0:
+ return "鍚�";
+ default:
+ return String.valueOf(this.sync);
+ }
+ }
+
+ public String getMotionCtg$(){
+ MotionCtgService service = SpringUtils.getBean(MotionCtgService.class);
+ MotionCtg motionCtg = service.getById(this.motionCtg);
+ if (!Cools.isEmpty(motionCtg)){
+ return String.valueOf(motionCtg.getName());
+ }
+ return null;
+ }
+
+ public String getMotionSts$(){
+ MotionStsService service = SpringUtils.getBean(MotionStsService.class);
+ MotionSts motionSts = service.getById(this.motionSts);
+ if (!Cools.isEmpty(motionSts)){
+ return String.valueOf(motionSts.getName());
+ }
+ return null;
+ }
+
+ public String getDeviceCtg$(){
+ DeviceTypeService service = SpringUtils.getBean(DeviceTypeService.class);
+ DeviceType deviceType = service.getById(this.deviceCtg);
+ if (!Cools.isEmpty(deviceType)){
+ return String.valueOf(deviceType.getName());
+ }
+ return null;
+ }
+
+ public String getIoTime$(){
+ if (Cools.isEmpty(this.ioTime)){
+ return "";
+ }
+ return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime);
+ }
+
+ public String getStartTime$(){
+ if (Cools.isEmpty(this.startTime)){
+ return "";
+ }
+ return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.startTime);
+ }
+
+ public String getEndTime$(){
+ if (Cools.isEmpty(this.endTime)){
+ return "";
+ }
+ return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.endTime);
+ }
+
+ public String getErrTime$(){
+ if (Cools.isEmpty(this.errTime)){
+ return "";
+ }
+ return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.errTime);
+ }
+
+ public String getStatus$(){
+ if (null == this.status){ return null; }
+ switch (this.status){
+ case 1:
+ return "姝e父";
+ 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 String getDeleted$(){
+ if (null == this.deleted){ return null; }
+ switch (this.deleted){
+ case 1:
+ return "鏄�";
+ case 0:
+ return "鍚�";
+ default:
+ return String.valueOf(this.deleted);
+ }
+ }
+
+ public String getHostId$(){
+ HostService service = SpringUtils.getBean(HostService.class);
+ Host host = service.getById(this.hostId);
+ if (!Cools.isEmpty(host)){
+ return String.valueOf(host.getName());
+ }
+ return null;
+ }
+
+
+}
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/mapper/MotionLogMapper.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/mapper/MotionLogMapper.java
new file mode 100644
index 0000000..70fd19e
--- /dev/null
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/mapper/MotionLogMapper.java
@@ -0,0 +1,12 @@
+package com.zy.asrs.wcs.core.mapper;
+
+import com.zy.asrs.wcs.core.entity.MotionLog;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+@Mapper
+@Repository
+public interface MotionLogMapper extends BaseMapper<MotionLog> {
+
+}
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/MotionLogService.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/MotionLogService.java
new file mode 100644
index 0000000..ea5ea88
--- /dev/null
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/MotionLogService.java
@@ -0,0 +1,8 @@
+package com.zy.asrs.wcs.core.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zy.asrs.wcs.core.entity.MotionLog;
+
+public interface MotionLogService extends IService<MotionLog> {
+
+}
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/MotionLogServiceImpl.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/MotionLogServiceImpl.java
new file mode 100644
index 0000000..4867216
--- /dev/null
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/MotionLogServiceImpl.java
@@ -0,0 +1,12 @@
+package com.zy.asrs.wcs.core.service.impl;
+
+import com.zy.asrs.wcs.core.mapper.MotionLogMapper;
+import com.zy.asrs.wcs.core.entity.MotionLog;
+import com.zy.asrs.wcs.core.service.MotionLogService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+@Service("motionLogService")
+public class MotionLogServiceImpl extends ServiceImpl<MotionLogMapper, MotionLog> implements MotionLogService {
+
+}
diff --git a/zy-asrs-wcs/src/main/resources/mapper/core/MotionLogMapper.xml b/zy-asrs-wcs/src/main/resources/mapper/core/MotionLogMapper.xml
new file mode 100644
index 0000000..c5f6423
--- /dev/null
+++ b/zy-asrs-wcs/src/main/resources/mapper/core/MotionLogMapper.xml
@@ -0,0 +1,5 @@
+<?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.asrs.wcs.core.mapper.MotionLogMapper">
+
+</mapper>
--
Gitblit v1.9.1