From f43b508dda7334487a1640b0bbd908d7b3aa3cb6 Mon Sep 17 00:00:00 2001
From: Junjie <xjj@123>
Date: 星期二, 15 十月 2024 13:14:28 +0800
Subject: [PATCH] #
---
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/utils/CodeBuilder.java | 6
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/MainServiceImpl.java | 66 ++-
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/mapper/ShuttleChargeStaMapper.java | 12
zy-asrs-flow/src/pages/deviceConfig/shuttleChargeSta/components/edit.jsx | 165 ++++++++
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/ShuttleChargeStaServiceImpl.java | 12
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/entity/BasShuttle.java | 6
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/entity/ShuttleChargeSta.java | 230 ++++++++++++
zy-asrs-wcs/src/main/resources/mapper/core/ShuttleChargeStaMapper.xml | 5
zy-asrs-flow/src/pages/deviceConfig/shuttleChargeSta/index.jsx | 467 ++++++++++++++++++++++++
zy-asrs-flow/src/pages/deviceManage/basShuttle/index.jsx | 13
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/controller/ShuttleChargeStaController.java | 101 +++++
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/utils/ShuttleDispatcher.java | 29 -
zy-asrs-flow/src/pages/deviceManage/basShuttle/components/edit.jsx | 13
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/ShuttleChargeStaService.java | 8
14 files changed, 1,054 insertions(+), 79 deletions(-)
diff --git a/zy-asrs-flow/src/pages/deviceConfig/shuttleChargeSta/components/edit.jsx b/zy-asrs-flow/src/pages/deviceConfig/shuttleChargeSta/components/edit.jsx
new file mode 100644
index 0000000..c384df3
--- /dev/null
+++ b/zy-asrs-flow/src/pages/deviceConfig/shuttleChargeSta/components/edit.jsx
@@ -0,0 +1,165 @@
+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 }}
+ />
+ <ProFormText
+ name="name"
+ label="鍚嶇О"
+ colProps={{ md: 12, xl: 12 }}
+ />
+ </ProForm.Group>
+ <ProForm.Group>
+ <ProFormText
+ name="flag"
+ label="鏍囪瘑"
+ colProps={{ md: 12, xl: 12 }}
+ />
+ <ProFormSelect
+ name="status"
+ label="鐘舵��"
+ colProps={{ md: 12, xl: 12 }}
+ options={[
+ { label: '姝e父', value: 1 },
+ { label: '绂佺敤', value: 0 },
+ ]}
+ />
+ </ProForm.Group>
+ <ProForm.Group>
+ <ProFormDateTimePicker
+ name="createTime"
+ label="娣诲姞鏃堕棿"
+ colProps={{ md: 12, xl: 12 }}
+ transform={(value) => moment(value).toISOString()}
+ />
+ <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="updateTime"
+ 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>
+ <ProFormText
+ name="memo"
+ label="澶囨敞"
+ colProps={{ md: 12, xl: 12 }}
+ />
+ <ProFormDigit
+ name="deviceLev"
+ label="鍏呯數妗╂ゼ灞�"
+ colProps={{ md: 12, xl: 12 }}
+ fieldProps={{ precision: 0 }}
+ />
+ </ProForm.Group>
+ <ProForm.Group>
+ <ProFormText
+ name="deviceLoc"
+ label="鍏呯數妗╁簱浣嶅彿"
+ colProps={{ md: 12, xl: 12 }}
+ />
+ <ProFormText
+ name="standbyLoc"
+ label="寰呮満浣嶅簱浣嶅彿"
+ colProps={{ md: 12, xl: 12 }}
+ />
+ </ProForm.Group>
+
+ </ProForm>
+ </Modal>
+ </>
+ )
+}
+
+export default Edit;
diff --git a/zy-asrs-flow/src/pages/deviceConfig/shuttleChargeSta/index.jsx b/zy-asrs-flow/src/pages/deviceConfig/shuttleChargeSta/index.jsx
new file mode 100644
index 0000000..c12f244
--- /dev/null
+++ b/zy-asrs-flow/src/pages/deviceConfig/shuttleChargeSta/index.jsx
@@ -0,0 +1,467 @@
+
+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-shuttleChargeSta';
+
+const handleSave = async (val, intl) => {
+ const hide = message.loading(intl.formatMessage({ id: 'page.adding', defaultMessage: '姝e湪娣诲姞' }));
+ try {
+ const resp = await Http.doPost('api/shuttleChargeSta/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/shuttleChargeSta/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/shuttleChargeSta/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/shuttleChargeSta/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: 'name',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ copyable: true,
+ filterDropdown: (props) => <TextFilter
+ name='name'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '鏍囪瘑',
+ dataIndex: 'flag',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <TextFilter
+ name='flag'
+ {...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: 'createTime$',
+ // valueType: 'text',
+ // hidden: false,
+ // width: 140,
+ // filterDropdown: (props) => <DatetimeRangeFilter
+ // name='createTime'
+ // {...props}
+ // actionRef={actionRef}
+ // setSearchParam={setSearchParam}
+ // />,
+ // },
+ // {
+ // title: '娣诲姞浜哄憳',
+ // dataIndex: 'createBy$',
+ // valueType: 'text',
+ // hidden: false,
+ // width: 140,
+ // filterDropdown: (props) => <LinkFilter
+ // name='createBy'
+ // 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: 'updateBy$',
+ // valueType: 'text',
+ // hidden: false,
+ // width: 140,
+ // filterDropdown: (props) => <LinkFilter
+ // name='updateBy'
+ // major='user'
+ // {...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: 'deviceLev',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <TextFilter
+ name='deviceLev'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '鍏呯數妗╁簱浣嶅彿',
+ dataIndex: 'deviceLoc',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <TextFilter
+ name='deviceLoc'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: '寰呮満浣嶅簱浣嶅彿',
+ dataIndex: 'standbyLoc',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ filterDropdown: (props) => <TextFilter
+ name='standbyLoc'
+ {...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="shuttleChargeSta"
+ 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/shuttleChargeSta/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-flow/src/pages/deviceManage/basShuttle/components/edit.jsx b/zy-asrs-flow/src/pages/deviceManage/basShuttle/components/edit.jsx
index 8cec89c..c5c0f9a 100644
--- a/zy-asrs-flow/src/pages/deviceManage/basShuttle/components/edit.jsx
+++ b/zy-asrs-flow/src/pages/deviceManage/basShuttle/components/edit.jsx
@@ -87,9 +87,10 @@
fieldProps={{ precision: 0 }}
/>
<ProFormText
- name="idleLoc"
- label="鏆傚瓨搴撲綅"
+ name="disableLev"
+ label="灏忚溅绂佺敤妤煎眰"
colProps={{ md: 12, xl: 12 }}
+ fieldProps={{ precision: 0 }}
/>
</ProForm.Group>
<ProForm.Group>
@@ -155,14 +156,6 @@
<ProFormDigit
name="runSpeed"
label="灏忚溅杩愯閫熷害"
- colProps={{ md: 12, xl: 12 }}
- fieldProps={{ precision: 0 }}
- />
- </ProForm.Group>
- <ProForm.Group>
- <ProFormText
- name="disableLev"
- label="灏忚溅绂佺敤妤煎眰"
colProps={{ md: 12, xl: 12 }}
fieldProps={{ precision: 0 }}
/>
diff --git a/zy-asrs-flow/src/pages/deviceManage/basShuttle/index.jsx b/zy-asrs-flow/src/pages/deviceManage/basShuttle/index.jsx
index cf8b0f4..6032472 100644
--- a/zy-asrs-flow/src/pages/deviceManage/basShuttle/index.jsx
+++ b/zy-asrs-flow/src/pages/deviceManage/basShuttle/index.jsx
@@ -159,19 +159,6 @@
/>,
},
{
- title: '鏆傚瓨搴撲綅',
- dataIndex: 'idleLoc',
- valueType: 'text',
- hidden: false,
- width: 140,
- filterDropdown: (props) => <TextFilter
- name='idleLoc'
- {...props}
- actionRef={actionRef}
- setSearchParam={setSearchParam}
- />,
- },
- {
title: '鑷姩鍏呯數',
dataIndex: 'autoCharge',
valueType: 'text',
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/controller/ShuttleChargeStaController.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/controller/ShuttleChargeStaController.java
new file mode 100644
index 0000000..8a46951
--- /dev/null
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/controller/ShuttleChargeStaController.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.ShuttleChargeSta;
+import com.zy.asrs.wcs.core.service.ShuttleChargeStaService;
+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 ShuttleChargeStaController extends BaseController {
+
+ @Autowired
+ private ShuttleChargeStaService shuttleChargeStaService;
+
+ @PreAuthorize("hasAuthority('core:shuttleChargeSta:list')")
+ @PostMapping("/shuttleChargeSta/page")
+ public R page(@RequestBody Map<String, Object> map) {
+ BaseParam baseParam = buildParam(map, BaseParam.class);
+ PageParam<ShuttleChargeSta, BaseParam> pageParam = new PageParam<>(baseParam, ShuttleChargeSta.class);
+ return R.ok().add(shuttleChargeStaService.page(pageParam, pageParam.buildWrapper(true)));
+ }
+
+ @PreAuthorize("hasAuthority('core:shuttleChargeSta:list')")
+ @PostMapping("/shuttleChargeSta/list")
+ public R list(@RequestBody Map<String, Object> map) {
+ return R.ok().add(shuttleChargeStaService.list());
+ }
+
+ @PreAuthorize("hasAuthority('core:shuttleChargeSta:list')")
+ @GetMapping("/shuttleChargeSta/{id}")
+ public R get(@PathVariable("id") Long id) {
+ return R.ok().add(shuttleChargeStaService.getById(id));
+ }
+
+ @PreAuthorize("hasAuthority('core:shuttleChargeSta:save')")
+ @OperationLog("娣诲姞绌挎杞﹀厖鐢垫々")
+ @PostMapping("/shuttleChargeSta/save")
+ public R save(@RequestBody ShuttleChargeSta shuttleChargeSta) {
+ if (!shuttleChargeStaService.save(shuttleChargeSta)) {
+ return R.error("娣诲姞澶辫触");
+ }
+ return R.ok("娣诲姞鎴愬姛");
+ }
+
+ @PreAuthorize("hasAuthority('core:shuttleChargeSta:update')")
+ @OperationLog("淇敼绌挎杞﹀厖鐢垫々")
+ @PostMapping("/shuttleChargeSta/update")
+ public R update(@RequestBody ShuttleChargeSta shuttleChargeSta) {
+ if (!shuttleChargeStaService.updateById(shuttleChargeSta)) {
+ return R.error("淇敼澶辫触");
+ }
+ return R.ok("淇敼鎴愬姛");
+ }
+
+ @PreAuthorize("hasAuthority('core:shuttleChargeSta:remove')")
+ @OperationLog("鍒犻櫎绌挎杞﹀厖鐢垫々")
+ @PostMapping("/shuttleChargeSta/remove/{ids}")
+ public R remove(@PathVariable Long[] ids) {
+ if (!shuttleChargeStaService.removeByIds(Arrays.asList(ids))) {
+ return R.error("鍒犻櫎澶辫触");
+ }
+ return R.ok("鍒犻櫎鎴愬姛");
+ }
+
+ @PreAuthorize("hasAuthority('core:shuttleChargeSta:list')")
+ @PostMapping("/shuttleChargeSta/query")
+ public R query(@RequestParam(required = false) String condition) {
+ List<KeyValVo> vos = new ArrayList<>();
+ LambdaQueryWrapper<ShuttleChargeSta> wrapper = new LambdaQueryWrapper<>();
+ if (!Cools.isEmpty(condition)) {
+ wrapper.like(ShuttleChargeSta::getName, condition);
+ }
+ shuttleChargeStaService.page(new Page<>(1, 30), wrapper).getRecords().forEach(
+ item -> vos.add(new KeyValVo(item.getId(), item.getName()))
+ );
+ return R.ok().add(vos);
+ }
+
+ @PreAuthorize("hasAuthority('core:shuttleChargeSta:list')")
+ @PostMapping("/shuttleChargeSta/export")
+ public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception {
+ ExcelUtil.build(ExcelUtil.create(shuttleChargeStaService.list(), ShuttleChargeSta.class), response);
+ }
+
+}
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/entity/BasShuttle.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/entity/BasShuttle.java
index 9a50b99..c885f1a 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/entity/BasShuttle.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/entity/BasShuttle.java
@@ -69,12 +69,6 @@
private Integer taskNo;
/**
- * 鏆傚瓨搴撲綅
- */
- @ApiModelProperty(value= "鏆傚瓨搴撲綅")
- private String idleLoc;
-
- /**
* 鑷姩鍏呯數
*/
@ApiModelProperty(value= "鑷姩鍏呯數")
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/entity/ShuttleChargeSta.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/entity/ShuttleChargeSta.java
new file mode 100644
index 0000000..b951d79
--- /dev/null
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/entity/ShuttleChargeSta.java
@@ -0,0 +1,230 @@
+package com.zy.asrs.wcs.core.entity;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+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 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("wcs_shuttle_charge_sta")
+public class ShuttleChargeSta 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 flag;
+
+ /**
+ * 鎵�灞炴満鏋�
+ */
+ @ApiModelProperty(value= "鎵�灞炴満鏋�")
+ private Long hostId;
+
+ /**
+ * 鐘舵�� 1: 姝e父 0: 绂佺敤
+ */
+ @ApiModelProperty(value= "鐘舵�� 1: 姝e父 0: 绂佺敤 ")
+ private Integer status;
+
+ /**
+ * 鏄惁鍒犻櫎 1: 鏄� 0: 鍚�
+ */
+ @ApiModelProperty(value= "鏄惁鍒犻櫎 1: 鏄� 0: 鍚� ")
+ @TableLogic
+ private Integer deleted;
+
+ /**
+ * 娣诲姞鏃堕棿
+ */
+ @ApiModelProperty(value= "娣诲姞鏃堕棿")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ private Date createTime;
+
+ /**
+ * 娣诲姞浜哄憳
+ */
+ @ApiModelProperty(value= "娣诲姞浜哄憳")
+ private Long createBy;
+
+ /**
+ * 淇敼鏃堕棿
+ */
+ @ApiModelProperty(value= "淇敼鏃堕棿")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ private Date updateTime;
+
+ /**
+ * 淇敼浜哄憳
+ */
+ @ApiModelProperty(value= "淇敼浜哄憳")
+ private Long updateBy;
+
+ /**
+ * 澶囨敞
+ */
+ @ApiModelProperty(value= "澶囨敞")
+ private String memo;
+
+ /**
+ * 鍏呯數妗╂ゼ灞�
+ */
+ @ApiModelProperty(value= "鍏呯數妗╂ゼ灞�")
+ private Integer deviceLev;
+
+ /**
+ * 鍏呯數妗╁簱浣嶅彿
+ */
+ @ApiModelProperty(value= "鍏呯數妗╁簱浣嶅彿")
+ private String deviceLoc;
+
+ /**
+ * 寰呮満浣嶅簱浣嶅彿
+ */
+ @ApiModelProperty(value= "寰呮満浣嶅簱浣嶅彿")
+ private String standbyLoc;
+
+ public ShuttleChargeSta() {}
+
+ public ShuttleChargeSta(String uuid,String name,String flag,Long hostId,Integer status,Integer deleted,Date createTime,Long createBy,Date updateTime,Long updateBy,String memo,Integer deviceLev,String deviceLoc,String standbyLoc) {
+ this.uuid = uuid;
+ this.name = name;
+ this.flag = flag;
+ this.hostId = hostId;
+ this.status = status;
+ this.deleted = deleted;
+ this.createTime = createTime;
+ this.createBy = createBy;
+ this.updateTime = updateTime;
+ this.updateBy = updateBy;
+ this.memo = memo;
+ this.deviceLev = deviceLev;
+ this.deviceLoc = deviceLoc;
+ this.standbyLoc = standbyLoc;
+ }
+
+// ShuttleChargeSta shuttleChargeSta = new ShuttleChargeSta(
+// null, // 缂栧彿
+// null, // 鍚嶇О
+// null, // 鏍囪瘑
+// null, // 鎵�灞炴満鏋�
+// null, // 鐘舵��
+// null, // 鏄惁鍒犻櫎
+// null, // 娣诲姞鏃堕棿
+// null, // 娣诲姞浜哄憳
+// null, // 淇敼鏃堕棿
+// null, // 淇敼浜哄憳
+// null, // 澶囨敞
+// null, // 鍏呯數妗╂ゼ灞�
+// null, // 鍏呯數妗╁簱浣嶅彿
+// null // 寰呮満浣嶅簱浣嶅彿
+// );
+
+ 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;
+ }
+
+ 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 getDeleted$(){
+ if (null == this.deleted){ return null; }
+ switch (this.deleted){
+ case 1:
+ return "鏄�";
+ case 0:
+ return "鍚�";
+ default:
+ return String.valueOf(this.deleted);
+ }
+ }
+
+ public String getCreateTime$(){
+ if (Cools.isEmpty(this.createTime)){
+ return "";
+ }
+ return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
+ }
+
+ 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 getUpdateTime$(){
+ if (Cools.isEmpty(this.updateTime)){
+ return "";
+ }
+ return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
+ }
+
+ 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;
+ }
+
+
+}
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/mapper/ShuttleChargeStaMapper.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/mapper/ShuttleChargeStaMapper.java
new file mode 100644
index 0000000..f3a6cdc
--- /dev/null
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/mapper/ShuttleChargeStaMapper.java
@@ -0,0 +1,12 @@
+package com.zy.asrs.wcs.core.mapper;
+
+import com.zy.asrs.wcs.core.entity.ShuttleChargeSta;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+@Mapper
+@Repository
+public interface ShuttleChargeStaMapper extends BaseMapper<ShuttleChargeSta> {
+
+}
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/ShuttleChargeStaService.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/ShuttleChargeStaService.java
new file mode 100644
index 0000000..b1c0b3a
--- /dev/null
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/ShuttleChargeStaService.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.ShuttleChargeSta;
+
+public interface ShuttleChargeStaService extends IService<ShuttleChargeSta> {
+
+}
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/MainServiceImpl.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/MainServiceImpl.java
index 1392aca..1c69d07 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/MainServiceImpl.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/MainServiceImpl.java
@@ -84,6 +84,8 @@
private BasLedService basLedService;
@Autowired
private DeviceBarcodeService deviceBarcodeService;
+ @Autowired
+ private ShuttleChargeStaService shuttleChargeStaService;
/**
* 缁勬墭
@@ -668,20 +670,19 @@
String currentLocNo = shuttleProtocol.getCurrentLocNo();
int lev = Utils.getLev(currentLocNo);//鑾峰彇灏忚溅妤煎眰
//鎼滅储灏忚溅褰撳墠妤煎眰鍏呯數妗�
- ArrayList<Loc> allChargeLoc = new ArrayList<>();
- List<Loc> list1 = locService.list(new LambdaQueryWrapper<Loc>()
- .eq(Loc::getLocSts, LocStsType.C.val())
- .eq(Loc::getStatus, 1)
- .eq(Loc::getLev, lev));
+ ArrayList<ShuttleChargeSta> allChargeLoc = new ArrayList<>();
+
+ List<ShuttleChargeSta> list1 = shuttleChargeStaService.list(new LambdaQueryWrapper<ShuttleChargeSta>()
+ .eq(ShuttleChargeSta::getDeviceLev, lev)
+ .eq(ShuttleChargeSta::getStatus, 1));
if (!list1.isEmpty()) {
allChargeLoc.addAll(list1);
}
//鎼滅储鍏朵粬妤煎眰鍏呯數妗�
- List<Loc> list2 = locService.list(new LambdaQueryWrapper<Loc>()
- .eq(Loc::getLocSts, LocStsType.C.val())
- .eq(Loc::getStatus, 1)
- .notIn(Loc::getLev, lev));
+ List<ShuttleChargeSta> list2 = shuttleChargeStaService.list(new LambdaQueryWrapper<ShuttleChargeSta>()
+ .notIn(ShuttleChargeSta::getDeviceLev, lev)
+ .eq(ShuttleChargeSta::getStatus, 1));
if (!list2.isEmpty()) {
allChargeLoc.addAll(list2);
}
@@ -692,24 +693,34 @@
}
//閫夋嫨绌洪棽鍏呯數妗�
- Loc chargeLoc = null;
- for (Loc loc : allChargeLoc) {
+ ShuttleChargeSta chargeSta = null;
+ for (ShuttleChargeSta shuttleChargeSta : allChargeLoc) {
// 鍒ゆ柇鍏呯數浣嶆槸鍚﹁鍗犵敤(杞﹁締浣嶇疆)
- if (Utils.hasShuttleInLoc(loc.getLocNo(), device.getId())) {
+ if (Utils.hasShuttleInLoc(shuttleChargeSta.getDeviceLoc(), device.getId())) {
continue;
}
// 鐩樼偣鍏呯數浣嶆槸鍚﹀瓨鍦ㄤ换鍔℃。
- List<Task> tasks = taskService.hasChargeInLoc(loc.getLocNo());
+ List<Task> tasks = taskService.hasChargeInLoc(shuttleChargeSta.getDeviceLoc());
if (!tasks.isEmpty()) {
continue;
}
- chargeLoc = loc;
+ Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>()
+ .eq(Loc::getLocNo, shuttleChargeSta.getDeviceLoc()));
+ if (loc == null) {
+ continue;
+ }
+
+ if (!loc.getLocSts().equals(LocStsType.C.val())) {
+ continue;//搴撲綅涓嶆槸鍏呯數妗�
+ }
+
+ chargeSta = shuttleChargeSta;
break;
}
- if (chargeLoc == null) {
+ if (chargeSta == null) {
continue;//鏈壘鍒板厖鐢垫々
}
@@ -730,7 +741,7 @@
continue;
}
- String chargeLocNo = chargeLoc.getLocNo();
+ String chargeLocNo = chargeSta.getDeviceLoc();
Task task = new Task();
task.setUuid(String.valueOf(snowflakeIdWorker.nextId()));
task.setTaskNo(String.valueOf(Utils.getTaskNo("CHARGE")));
@@ -770,14 +781,6 @@
* 鍥涘悜绌挎杞︾數閲忔娴� ===>> 婊$數鍚庡洖鍒板緟鏈轰綅
*/
public synchronized void loopShuttleToStandbyCauseCharge() {
- Integer enoughPower = 90;
- Dict dict = dictService.getOne(new LambdaQueryWrapper<Dict>()
- .eq(Dict::getFlag, "chargeMaxValue")
- .eq(Dict::getStatus, 1));
- if (dict != null) {
- enoughPower = Integer.parseInt(dict.getValue());
- }
-
//鑾峰彇杩佺Щ浠诲姟绫诲瀷
TaskCtg taskCtg = taskCtgService.getOne(new LambdaQueryWrapper<TaskCtg>()
.eq(TaskCtg::getFlag, String.valueOf(TaskCtgType.MOVE))
@@ -823,8 +826,21 @@
continue;
}
+ ShuttleChargeSta chargeSta = shuttleChargeStaService.getOne(new LambdaQueryWrapper<ShuttleChargeSta>()
+ .eq(ShuttleChargeSta::getDeviceLoc, chargeTask.getDestLoc())
+ .eq(ShuttleChargeSta::getStatus, 1));
+ if (chargeSta == null) {
+ continue;//鍏呯數妗╀笉瀛樺湪锛屽紓甯�
+ }
+
+ String standbyLoc = chargeSta.getStandbyLoc();
+ if (standbyLoc == null) {
+ continue;//閬胯浣嶇疆鏁版嵁涓嶅瓨鍦�
+ }
+ List<String> availableLoc = JSON.parseArray(standbyLoc, String.class);
+
//鑾峰彇閬胯浣嶇疆
- String standByLocNo = shuttleDispatcher.searchStandByLocNo(Integer.valueOf(device.getDeviceNo()), device.getHostId(), shuttleThread.getStatus().getCurrentLocNo());
+ String standByLocNo = shuttleDispatcher.searchAvailableLocNo(Integer.valueOf(device.getDeviceNo()), device.getHostId(), shuttleThread.getStatus().getCurrentLocNo(), availableLoc);
Task task = new Task();
task.setUuid(String.valueOf(snowflakeIdWorker.nextId()));
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/ShuttleChargeStaServiceImpl.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/ShuttleChargeStaServiceImpl.java
new file mode 100644
index 0000000..c53ee3c
--- /dev/null
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/ShuttleChargeStaServiceImpl.java
@@ -0,0 +1,12 @@
+package com.zy.asrs.wcs.core.service.impl;
+
+import com.zy.asrs.wcs.core.mapper.ShuttleChargeStaMapper;
+import com.zy.asrs.wcs.core.entity.ShuttleChargeSta;
+import com.zy.asrs.wcs.core.service.ShuttleChargeStaService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+@Service("shuttleChargeStaService")
+public class ShuttleChargeStaServiceImpl extends ServiceImpl<ShuttleChargeStaMapper, ShuttleChargeSta> implements ShuttleChargeStaService {
+
+}
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/utils/ShuttleDispatcher.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/utils/ShuttleDispatcher.java
index 18d9451..7f81f4c 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/utils/ShuttleDispatcher.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/utils/ShuttleDispatcher.java
@@ -284,9 +284,9 @@
}
/**
- * 鎼滅储閬胯搴撲綅锛岄�氳繃灏忚溅鍙峰拰鐩爣搴撲綅
+ * 鎼滅储鍙敤搴撲綅锛岄�氳繃灏忚溅鍙峰拰鐩爣搴撲綅
*/
- public String searchStandByLocNo(Integer shuttleNo, Long hostId, String locNo) {
+ public String searchAvailableLocNo(Integer shuttleNo, Long hostId, String currentLocNo, List<String> locNos) {
BasShuttle basShuttle = basShuttleService.getOne(new LambdaQueryWrapper<BasShuttle>()
.eq(BasShuttle::getShuttleNo, shuttleNo)
.eq(BasShuttle::getHostId, hostId));
@@ -294,33 +294,18 @@
throw new CoolException("灏忚溅鍩虹鏁版嵁涓嶅瓨鍦�");
}
- String idleLoc = basShuttle.getIdleLoc();
- if (Cools.isEmpty(idleLoc)) {
- throw new CoolException("灏忚溅閬胯鏁版嵁涓嶅瓨鍦�");
- }
-
- int lev = Utils.getLev(locNo);//褰撳墠妤煎眰
- List<String> standbyLoc = JSON.parseArray(idleLoc, String.class);
- if (standbyLoc.isEmpty()) {
- throw new CoolException("閬胯鏁版嵁寮傚父");
- }
- //鑾峰彇褰撳墠灞傞伩璁╀綅缃�
- List<String> currentLevStandByLoc = new ArrayList<>();
- for (String loc : standbyLoc) {
- if (Utils.getLev(loc) == lev) {
- currentLevStandByLoc.add(loc);
- }
- }
- if (currentLevStandByLoc.isEmpty()) {
+ if (locNos.isEmpty()) {
throw new CoolException("褰撳墠灞傛棤閬胯浣嶇疆");
}
+ int lev = Utils.getLev(currentLocNo);
+
Integer finalDistance = ShuttleDispatcher.INF;
String recentLoc = null;
- for (String loc : currentLevStandByLoc) {
+ for (String loc : locNos) {
//褰撳墠绌挎杞﹀埌閬胯浣嶈绠�
List<NavigateNode> currentShuttlePath = NavigateUtils.calc(
- locNo
+ currentLocNo
, loc
, NavigationMapType.NORMAL.id
, Utils.getShuttlePoints(shuttleNo, lev)
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/utils/CodeBuilder.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/utils/CodeBuilder.java
index ff07bf0..7ce7e03 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/utils/CodeBuilder.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/utils/CodeBuilder.java
@@ -15,15 +15,15 @@
generator.frontendPrefixPath = "zy-asrs-flow/";
generator.sqlOsType = SqlOsType.MYSQL;
- generator.url="127.0.0.1:3306/asrs";
+ generator.url="127.0.0.1:3306/jxgtasrs";
generator.username="root";
generator.password="root";
// generator.url="47.97.1.152:51433;databasename=jkasrs";
// generator.username="sa";
// generator.password="Zoneyung@zy56$";
- generator.table="wcs_bas_conveyor_path";
- generator.tableName = "杈撻�佽矾寰勯厤缃�";
+ generator.table="wcs_shuttle_charge_sta";
+ generator.tableName = "绌挎杞﹀厖鐢垫々";
generator.packagePath="com.zy.asrs.wcs.core";
generator.build();
diff --git a/zy-asrs-wcs/src/main/resources/mapper/core/ShuttleChargeStaMapper.xml b/zy-asrs-wcs/src/main/resources/mapper/core/ShuttleChargeStaMapper.xml
new file mode 100644
index 0000000..4ca5102
--- /dev/null
+++ b/zy-asrs-wcs/src/main/resources/mapper/core/ShuttleChargeStaMapper.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.ShuttleChargeStaMapper">
+
+</mapper>
--
Gitblit v1.9.1