| | |
| | | const open = ref(false); |
| | | const showWidth = ref("60%") |
| | | const records = ref([]) |
| | | const waveId = ref(null) |
| | | const loading = ref(false) |
| | | const stockOutChild = ref(null) |
| | | |
| | |
| | | |
| | | stockOutChild.value.open = true; |
| | | stockOutChild.value.records = param; |
| | | stockOutChild.value.waveId = waveId.value; |
| | | stockOutChild.value.showWidth = '55%' |
| | | |
| | | emit('reload', true) |
| | | // emit('reload', true) |
| | | } |
| | | |
| | | const handleOrderMergePreview = () => { |
| | |
| | | |
| | | const handleCloseParent = () => { |
| | | open.value = false; |
| | | emit('reload', true) |
| | | } |
| | | |
| | | defineExpose({ |
| | | open, |
| | | showWidth, |
| | | records, |
| | | waveId, |
| | | }) |
| | | |
| | | </script> |
| | |
| | | |
| | | const TABLE_KEY = 'table-order-out-preview'; |
| | | |
| | | const emit = defineEmits(['closeParent']) |
| | | const emit = defineEmits(['closeParent', 'reload']) |
| | | |
| | | const { |
| | | getColumnSearchProps, |
| | |
| | | const open = ref(false); |
| | | const showWidth = ref("60%") |
| | | const records = ref([]) |
| | | const waveId = ref(null) |
| | | const loading = ref(false) |
| | | let tableDataValue = [] |
| | | let tableDataColSpan = [] |
| | |
| | | }) |
| | | |
| | | const handleOk = () => { |
| | | post('/api/out/orderOut/merge', tableData.value).then((resp) => { |
| | | let requestParam = { |
| | | waveId: waveId.value, |
| | | list: tableData.value |
| | | }; |
| | | |
| | | post('/api/out/orderOut/merge', requestParam).then((resp) => { |
| | | let result = resp.data; |
| | | if (result.code == 200) { |
| | | message.success(formatMessage('page.add.success', '出库成功')); |
| | | open.value = false; |
| | | emit('closeParent', true) |
| | | emit('reload', true) |
| | | } else { |
| | | message.error(result.msg); |
| | | } |
| | |
| | | open, |
| | | showWidth, |
| | | records, |
| | | waveId, |
| | | }) |
| | | </script> |
| | | |
New file |
| | |
| | | <script setup> |
| | | import { ref, nextTick } from 'vue'; |
| | | import { get, post, postBlob, postForm } from '@/utils/request.js' |
| | | import { formatMessage } from '@/utils/localeUtils.js'; |
| | | import { message } from 'ant-design-vue'; |
| | | |
| | | const formTable = ref(null); |
| | | const submitButton = ref(null); |
| | | const isSave = ref(true); |
| | | const open = ref(false); |
| | | const initFormData = {} |
| | | let formData = ref(initFormData); |
| | | |
| | | const emit = defineEmits(['tableReload']) |
| | | |
| | | const handleOk = (e) => { |
| | | nextTick(() => { |
| | | setTimeout(() => { |
| | | submitButton.value.$el.click(); |
| | | }, 100); |
| | | }); |
| | | }; |
| | | |
| | | const onFinish = values => { |
| | | // console.log('Success:', values); |
| | | open.value = false; |
| | | post(isSave.value ? '/api/cacheSite/save' : '/api/cacheSite/update', formData.value).then((resp) => { |
| | | let result = resp.data; |
| | | if (result.code === 200) { |
| | | message.success(isSave.value ? formatMessage('page.add.success', '新增成功') : formatMessage('page.update.success', '更新成功')); |
| | | } else { |
| | | message.error(result.msg); |
| | | } |
| | | emit('tableReload', 'reload') |
| | | nextTick(() => { |
| | | formTable.value.resetFields() |
| | | }) |
| | | }) |
| | | }; |
| | | const onFinishFailed = errorInfo => { |
| | | console.log('Failed:', errorInfo); |
| | | }; |
| | | |
| | | const orderQueryList = ref(null); |
| | | orderQuery(); |
| | | function orderQuery() { |
| | | postForm('/api/order/query', {}).then(resp => { |
| | | let result = resp.data; |
| | | orderQueryList.value = result.data; |
| | | }) |
| | | } |
| | | const userQueryList = ref(null); |
| | | userQuery(); |
| | | function userQuery() { |
| | | postForm('/api/user/query', {}).then(resp => { |
| | | let result = resp.data; |
| | | userQueryList.value = result.data; |
| | | }) |
| | | } |
| | | |
| | | |
| | | defineExpose({ |
| | | open, |
| | | formData, |
| | | initFormData, |
| | | isSave, |
| | | }) |
| | | |
| | | </script> |
| | | |
| | | <script> |
| | | export default { |
| | | name: '缓存站点-edit' |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <a-modal v-model:open="open" |
| | | :title="isSave ? formatMessage('page.add', '添加') : formatMessage('page.edit', '编辑')" @ok="handleOk" |
| | | style="width: 600px;"> |
| | | <a-form :model="formData" ref="formTable" name="formTable" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }" |
| | | style="display: flex;justify-content: space-between;flex-wrap: wrap;" autocomplete="off" |
| | | @finish="onFinish" @finishFailed="onFinishFailed"> |
| | | <a-form-item |
| | | :label="formatMessage('db.man_cache_site.site_no', '站点编号') " |
| | | name="siteNo" |
| | | style="width: 250px;" |
| | | > |
| | | <a-input |
| | | v-model:value="formData.siteNo" |
| | | /> |
| | | </a-form-item> |
| | | <a-form-item |
| | | :label="formatMessage('db.man_cache_site.site_status', '站点状态') " |
| | | name="siteStatus" |
| | | style="width: 250px;" |
| | | > |
| | | <a-select |
| | | v-model:value="formData.siteStatus" |
| | | :options="[ |
| | | { label: '空站', value: 0 }, |
| | | { label: '满站', value: 1 }, |
| | | { label: '预约', value: 2 }, |
| | | ]" |
| | | > |
| | | </a-select> |
| | | </a-form-item> |
| | | <a-form-item |
| | | :label="formatMessage('db.man_cache_site.order_id', '订单ID') " |
| | | name="orderId" |
| | | style="width: 250px;" |
| | | > |
| | | <a-select |
| | | v-model:value="formData.orderId" |
| | | :placeholder="formatMessage('common.select', '请选择')" |
| | | style="width: 100%" |
| | | show-search |
| | | :options="orderQueryList" |
| | | optionFilterProp="label" |
| | | optionLabelProp="label" |
| | | > |
| | | </a-select> |
| | | </a-form-item> |
| | | <a-form-item |
| | | :label="formatMessage('db.man_cache_site.order_no', '订单编号') " |
| | | name="orderNo" |
| | | style="width: 250px;" |
| | | > |
| | | <a-input |
| | | v-model:value="formData.orderNo" |
| | | /> |
| | | </a-form-item> |
| | | <a-form-item |
| | | :label="formatMessage('db.man_cache_site.status', '状态') " |
| | | name="status" |
| | | style="width: 250px;" |
| | | > |
| | | <a-select |
| | | v-model:value="formData.status" |
| | | :options="[ |
| | | { label: '正常', value: 1 }, |
| | | { label: '禁用', value: 0 }, |
| | | ]" |
| | | > |
| | | </a-select> |
| | | </a-form-item> |
| | | <a-form-item |
| | | :label="formatMessage('db.man_cache_site.create_time', '添加时间') " |
| | | name="createTime" |
| | | style="width: 250px;" |
| | | > |
| | | <a-date-picker |
| | | v-model:value="formData.createTime" |
| | | show-time |
| | | format="YYYY-MM-DD HH:mm:ss" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | /> |
| | | </a-form-item> |
| | | <a-form-item |
| | | :label="formatMessage('db.man_cache_site.create_by', '添加人员') " |
| | | name="createBy" |
| | | style="width: 250px;" |
| | | > |
| | | <a-select |
| | | v-model:value="formData.createBy" |
| | | :placeholder="formatMessage('common.select', '请选择')" |
| | | style="width: 100%" |
| | | show-search |
| | | :options="userQueryList" |
| | | optionFilterProp="label" |
| | | optionLabelProp="label" |
| | | > |
| | | </a-select> |
| | | </a-form-item> |
| | | <a-form-item |
| | | :label="formatMessage('db.man_cache_site.update_time', '修改时间') " |
| | | name="updateTime" |
| | | style="width: 250px;" |
| | | > |
| | | <a-date-picker |
| | | v-model:value="formData.updateTime" |
| | | show-time |
| | | format="YYYY-MM-DD HH:mm:ss" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | /> |
| | | </a-form-item> |
| | | <a-form-item |
| | | :label="formatMessage('db.man_cache_site.update_by', '修改人员') " |
| | | name="updateBy" |
| | | style="width: 250px;" |
| | | > |
| | | <a-select |
| | | v-model:value="formData.updateBy" |
| | | :placeholder="formatMessage('common.select', '请选择')" |
| | | style="width: 100%" |
| | | show-search |
| | | :options="userQueryList" |
| | | optionFilterProp="label" |
| | | optionLabelProp="label" |
| | | > |
| | | </a-select> |
| | | </a-form-item> |
| | | <a-form-item |
| | | :label="formatMessage('db.man_cache_site.memo', '备注') " |
| | | name="memo" |
| | | style="width: 250px;" |
| | | > |
| | | <a-input |
| | | v-model:value="formData.memo" |
| | | /> |
| | | </a-form-item> |
| | | |
| | | <a-form-item> |
| | | <a-button type="primary" html-type="submit" ref="submitButton" |
| | | style="visibility: hidden;">Submit</a-button> |
| | | </a-form-item> |
| | | </a-form> |
| | | </a-modal> |
| | | </div> |
| | | </template> |
| | | |
| | | <style></style> |
New file |
| | |
| | | <script setup> |
| | | import { getCurrentInstance, ref, computed, reactive } from 'vue'; |
| | | import { useRouter } from "vue-router"; |
| | | import { get, post, postBlob } from '@/utils/request.js' |
| | | import { message, Modal } from 'ant-design-vue'; |
| | | import { logout } from '@/config.js'; |
| | | import EditView from './edit.vue' |
| | | import { formatMessage } from '@/utils/localeUtils.js'; |
| | | import useTableSearch from '@/utils/tableUtils.jsx'; |
| | | const context = getCurrentInstance()?.appContext.config.globalProperties; |
| | | |
| | | const router = useRouter(); |
| | | |
| | | const TABLE_KEY = 'table-cacheSite'; |
| | | let currentPage = 1; |
| | | let pageSize = 10; |
| | | const searchInput = ref("") |
| | | const editChild = ref(null) |
| | | |
| | | const state = reactive({ |
| | | selectedRowKeys: [], |
| | | loading: false, |
| | | }); |
| | | |
| | | let tableData = ref([]); |
| | | getPage(); |
| | | |
| | | const { |
| | | getColumnSearchProps, |
| | | handleResizeColumn, |
| | | } = useTableSearch(); |
| | | |
| | | const columns = [ |
| | | { |
| | | title: formatMessage('db.man_cache_site.site_no', '站点编号'), |
| | | dataIndex: 'siteNo', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('siteNo'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_cache_site.site_status', '站点状态'), |
| | | dataIndex: 'siteStatus$', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('siteStatus$'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_cache_site.order_id', '订单ID'), |
| | | dataIndex: 'orderId$', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('orderId$'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_cache_site.order_no', '订单编号'), |
| | | dataIndex: 'orderNo', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('orderNo'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_cache_site.status', '状态'), |
| | | dataIndex: 'status$', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('status$'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_cache_site.create_time', '添加时间'), |
| | | dataIndex: 'createTime$', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('createTime$'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_cache_site.create_by', '添加人员'), |
| | | dataIndex: 'createBy$', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('createBy$'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_cache_site.update_time', '修改时间'), |
| | | dataIndex: 'updateTime$', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('updateTime$'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_cache_site.update_by', '修改人员'), |
| | | dataIndex: 'updateBy$', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('updateBy$'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_cache_site.memo', '备注'), |
| | | dataIndex: 'memo', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('memo'), |
| | | }, |
| | | |
| | | { |
| | | title: formatMessage('common.operation', '操作'), |
| | | name: 'oper', |
| | | dataIndex: 'oper', |
| | | key: 'oper', |
| | | width: 140, |
| | | fixed: 'right', |
| | | }, |
| | | ]; |
| | | |
| | | const hasSelected = computed(() => state.selectedRowKeys.length > 0); |
| | | const start = () => { |
| | | state.loading = true; |
| | | // ajax request after empty completing |
| | | setTimeout(() => { |
| | | state.loading = false; |
| | | state.selectedRowKeys = []; |
| | | }, 1000); |
| | | }; |
| | | const onSelectChange = selectedRowKeys => { |
| | | // console.log('selectedRowKeys changed: ', selectedRowKeys); |
| | | state.selectedRowKeys = selectedRowKeys; |
| | | }; |
| | | |
| | | function getPage() { |
| | | state.loading = true; |
| | | post('/api/cacheSite/page', { |
| | | current: currentPage, |
| | | pageSize: pageSize, |
| | | condition: searchInput.value |
| | | }).then((resp) => { |
| | | let result = resp.data; |
| | | if (result.code == 200) { |
| | | let data = result.data; |
| | | tableData.value = data; |
| | | |
| | | state.loading = false; |
| | | } else if (result.code === 401) { |
| | | message.error(result.msg); |
| | | logout() |
| | | } else { |
| | | message.error(result.msg); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const handleEdit = (item) => { |
| | | editChild.value.open = true; |
| | | editChild.value.formData = item == null ? editChild.value.initFormData : JSON.parse(JSON.stringify(item)); |
| | | editChild.value.isSave = item == null; |
| | | } |
| | | |
| | | const handleDel = (rows) => { |
| | | Modal.confirm({ |
| | | title: formatMessage('page.delete', '删除'), |
| | | content: formatMessage('page.delete.confirm', '确定删除该项吗?'), |
| | | maskClosable: true, |
| | | onOk: async () => { |
| | | const hide = message.loading(formatMessage('common.loading', '请求中')); |
| | | try { |
| | | post('/api/cacheSite/remove/' + rows.map((row) => row.id).join(','), {}).then(resp => { |
| | | let result = resp.data; |
| | | if (result.code === 200) { |
| | | message.success(result.msg); |
| | | } else { |
| | | message.error(result.msg); |
| | | } |
| | | getPage() |
| | | hide() |
| | | }) |
| | | } catch (error) { |
| | | message.error(formatMessage('common.fail', '请求失败')); |
| | | } |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/cacheSite/export', {}).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | | }) |
| | | }; |
| | | |
| | | const onSearch = () => { |
| | | // console.log('search'); |
| | | getPage() |
| | | } |
| | | |
| | | const onPageChange = (page, size) => { |
| | | currentPage = page; |
| | | pageSize = size; |
| | | getPage(); |
| | | } |
| | | |
| | | function handleTableReload(value) { |
| | | getPage() |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <script> |
| | | export default { |
| | | name: '缓存站点' |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <EditView ref="editChild" @tableReload="handleTableReload" /> |
| | | <div class="table-header"> |
| | | <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '请输入')" |
| | | style="width: 200px;" @search="onSearch" /> |
| | | <div class="table-header-right"> |
| | | <a-button @click="handleEdit(null)" type="primary">{{ formatMessage('page.add', '添加') }}</a-button> |
| | | <a-button @click="handleExport">{{ formatMessage('page.export', '导出') }}</a-button> |
| | | </div> |
| | | </div> |
| | | <a-table :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }" |
| | | :data-source="tableData.records" :defaultExpandAllRows="false" :key="TABLE_KEY" rowKey="id" |
| | | :pagination="{ total: tableData.total, onChange: onPageChange }" |
| | | :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="columns" @resizeColumn="handleResizeColumn" :loading="state.loading"> |
| | | <template #bodyCell="{ column, text, record }"> |
| | | <template v-if="column.dataIndex === 'oper'"> |
| | | <div style="display: flex;justify-content: space-evenly;"> |
| | | <a-button type="link" primary @click="handleEdit(record)">{{ formatMessage('page.edit', '编辑') }}</a-button> |
| | | <a-button type="link" danger @click="handleDel([record])">{{ formatMessage('page.delete', '删除') |
| | | }}</a-button> |
| | | </div> |
| | | </template> |
| | | </template> |
| | | </a-table> |
| | | </div> |
| | | </template> |
| | | |
| | | <style></style> |
| | |
| | | <div style="display: flex;"> |
| | | <a-card :title="formatMessage('common.order', '订单')" style="flex: 4;margin-right: 30px;"> |
| | | <div style="margin-bottom: 10px;display: flex;"> |
| | | <div style="margin-right: 10px;"> |
| | | <!-- <div style="margin-right: 10px;"> |
| | | <a-button @click="handleMergeOrderOut()"> |
| | | {{ formatMessage('common.orderOut', '合并订单') }} |
| | | </a-button> |
| | | </div> |
| | | </div> --> |
| | | <div style="margin-right: 10px;"> |
| | | <a-button @click="handleGenerateWave()"> |
| | | {{ formatMessage('common.generateWave', '生成波次') }} |
| | |
| | | <script setup> |
| | | import { getCurrentInstance, ref, computed, reactive } from 'vue'; |
| | | import { getCurrentInstance, ref, computed, reactive, watch } from 'vue'; |
| | | import { useRouter } from "vue-router"; |
| | | import { get, post, postBlob } from '@/utils/request.js' |
| | | import { message, Modal } from 'ant-design-vue'; |
| | |
| | | detl.waveId = item.id; |
| | | detl.waveType = item.waveType; |
| | | detl.waveType$ = item.waveType$; |
| | | detl.generateTask = item.generateTask; |
| | | tmp.push(detl) |
| | | }) |
| | | }) |
| | |
| | | // } |
| | | |
| | | const handleGenerateOut = (item) => { |
| | | console.log(item); |
| | | |
| | | get('/api/wave/list/' + item.waveId, {}).then(resp => { |
| | | let result = resp.data; |
| | | let data = result.data; |
| | |
| | | |
| | | orderOutMergePreviewChild.value.open = true; |
| | | orderOutMergePreviewChild.value.records = orderIds; |
| | | orderOutMergePreviewChild.value.waveId = item.waveId; |
| | | }) |
| | | } |
| | | |
| | |
| | | </div> --> |
| | | </div> |
| | | <a-table :data-source="tableData" :defaultExpandAllRows="false" :key="TABLE_KEY" rowKey="index" |
| | | :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="state.columns" @resizeColumn="handleResizeColumn" :loading="state.loading"> |
| | | :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="state.columns" @resizeColumn="handleResizeColumn" |
| | | :loading="state.loading"> |
| | | <template #bodyCell="{ column, text, record }"> |
| | | <template v-if="column.dataIndex === 'oper'"> |
| | | <div style="display: flex;justify-content: space-evenly;"> |
| | | <a-button type="link" primary @click="handleGenerateOut(record)">{{ formatMessage('page.generateOut', |
| | | '生成出库任务') |
| | | }}</a-button> |
| | | <a-button type="link" primary @click="handleGenerateOut(record)" :disabled="record.generateTask">{{ |
| | | formatMessage('page.generateOut', |
| | | '生成出库任务') |
| | | }}</a-button> |
| | | <a-button type="link" danger @click="handleDel([record])">{{ formatMessage('page.delete', '删除') |
| | | }}</a-button> |
| | | </div> |
New file |
| | |
| | | <script setup> |
| | | import { ref, nextTick } from 'vue'; |
| | | import { get, post, postBlob, postForm } from '@/utils/request.js' |
| | | import { formatMessage } from '@/utils/localeUtils.js'; |
| | | import { message } from 'ant-design-vue'; |
| | | |
| | | const formTable = ref(null); |
| | | const submitButton = ref(null); |
| | | const isSave = ref(true); |
| | | const open = ref(false); |
| | | const initFormData = {} |
| | | let formData = ref(initFormData); |
| | | |
| | | const emit = defineEmits(['tableReload']) |
| | | |
| | | const handleOk = (e) => { |
| | | nextTick(() => { |
| | | setTimeout(() => { |
| | | submitButton.value.$el.click(); |
| | | }, 100); |
| | | }); |
| | | }; |
| | | |
| | | const onFinish = values => { |
| | | // console.log('Success:', values); |
| | | open.value = false; |
| | | post(isSave.value ? '/api/waveSeed/save' : '/api/waveSeed/update', formData.value).then((resp) => { |
| | | let result = resp.data; |
| | | if (result.code === 200) { |
| | | message.success(isSave.value ? formatMessage('page.add.success', '新增成功') : formatMessage('page.update.success', '更新成功')); |
| | | } else { |
| | | message.error(result.msg); |
| | | } |
| | | emit('tableReload', 'reload') |
| | | nextTick(() => { |
| | | formTable.value.resetFields() |
| | | }) |
| | | }) |
| | | }; |
| | | const onFinishFailed = errorInfo => { |
| | | console.log('Failed:', errorInfo); |
| | | }; |
| | | |
| | | const cacheSiteQueryList = ref(null); |
| | | cacheSiteQuery(); |
| | | function cacheSiteQuery() { |
| | | postForm('/api/cacheSite/query', {}).then(resp => { |
| | | let result = resp.data; |
| | | cacheSiteQueryList.value = result.data; |
| | | }) |
| | | } |
| | | const orderDetlQueryList = ref(null); |
| | | orderDetlQuery(); |
| | | function orderDetlQuery() { |
| | | postForm('/api/orderDetl/query', {}).then(resp => { |
| | | let result = resp.data; |
| | | orderDetlQueryList.value = result.data; |
| | | }) |
| | | } |
| | | const userQueryList = ref(null); |
| | | userQuery(); |
| | | function userQuery() { |
| | | postForm('/api/user/query', {}).then(resp => { |
| | | let result = resp.data; |
| | | userQueryList.value = result.data; |
| | | }) |
| | | } |
| | | |
| | | |
| | | defineExpose({ |
| | | open, |
| | | formData, |
| | | initFormData, |
| | | isSave, |
| | | }) |
| | | |
| | | </script> |
| | | |
| | | <script> |
| | | export default { |
| | | name: '波次播种-edit' |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <a-modal v-model:open="open" |
| | | :title="isSave ? formatMessage('page.add', '添加') : formatMessage('page.edit', '编辑')" @ok="handleOk" |
| | | style="width: 600px;"> |
| | | <a-form :model="formData" ref="formTable" name="formTable" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }" |
| | | style="display: flex;justify-content: space-between;flex-wrap: wrap;" autocomplete="off" |
| | | @finish="onFinish" @finishFailed="onFinishFailed"> |
| | | <a-form-item |
| | | :label="formatMessage('db.man_wave_seed.site_id', '站点ID') " |
| | | name="siteId" |
| | | style="width: 250px;" |
| | | > |
| | | <a-select |
| | | v-model:value="formData.siteId" |
| | | :placeholder="formatMessage('common.select', '请选择')" |
| | | style="width: 100%" |
| | | show-search |
| | | :options="cacheSiteQueryList" |
| | | optionFilterProp="label" |
| | | optionLabelProp="label" |
| | | > |
| | | </a-select> |
| | | </a-form-item> |
| | | <a-form-item |
| | | :label="formatMessage('db.man_wave_seed.site_no', '站点编号') " |
| | | name="siteNo" |
| | | style="width: 250px;" |
| | | > |
| | | <a-input |
| | | v-model:value="formData.siteNo" |
| | | /> |
| | | </a-form-item> |
| | | <a-form-item |
| | | :label="formatMessage('db.man_wave_seed.order_detl_id', '订单明细') " |
| | | name="orderDetlId" |
| | | style="width: 250px;" |
| | | > |
| | | <a-select |
| | | v-model:value="formData.orderDetlId" |
| | | :placeholder="formatMessage('common.select', '请选择')" |
| | | style="width: 100%" |
| | | show-search |
| | | :options="orderDetlQueryList" |
| | | optionFilterProp="label" |
| | | optionLabelProp="label" |
| | | > |
| | | </a-select> |
| | | </a-form-item> |
| | | <a-form-item |
| | | :label="formatMessage('db.man_wave_seed.anfme', '数量') " |
| | | name="anfme" |
| | | style="width: 250px;" |
| | | > |
| | | <a-input |
| | | v-model:value="formData.anfme" |
| | | /> |
| | | </a-form-item> |
| | | <a-form-item |
| | | :label="formatMessage('db.man_wave_seed.status', '状态') " |
| | | name="status" |
| | | style="width: 250px;" |
| | | > |
| | | <a-select |
| | | v-model:value="formData.status" |
| | | :options="[ |
| | | { label: '正常', value: 1 }, |
| | | { label: '禁用', value: 0 }, |
| | | ]" |
| | | > |
| | | </a-select> |
| | | </a-form-item> |
| | | <a-form-item |
| | | :label="formatMessage('db.man_wave_seed.create_time', '添加时间') " |
| | | name="createTime" |
| | | style="width: 250px;" |
| | | > |
| | | <a-date-picker |
| | | v-model:value="formData.createTime" |
| | | show-time |
| | | format="YYYY-MM-DD HH:mm:ss" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | /> |
| | | </a-form-item> |
| | | <a-form-item |
| | | :label="formatMessage('db.man_wave_seed.create_by', '添加人员') " |
| | | name="createBy" |
| | | style="width: 250px;" |
| | | > |
| | | <a-select |
| | | v-model:value="formData.createBy" |
| | | :placeholder="formatMessage('common.select', '请选择')" |
| | | style="width: 100%" |
| | | show-search |
| | | :options="userQueryList" |
| | | optionFilterProp="label" |
| | | optionLabelProp="label" |
| | | > |
| | | </a-select> |
| | | </a-form-item> |
| | | <a-form-item |
| | | :label="formatMessage('db.man_wave_seed.update_time', '修改时间') " |
| | | name="updateTime" |
| | | style="width: 250px;" |
| | | > |
| | | <a-date-picker |
| | | v-model:value="formData.updateTime" |
| | | show-time |
| | | format="YYYY-MM-DD HH:mm:ss" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | /> |
| | | </a-form-item> |
| | | <a-form-item |
| | | :label="formatMessage('db.man_wave_seed.update_by', '修改人员') " |
| | | name="updateBy" |
| | | style="width: 250px;" |
| | | > |
| | | <a-select |
| | | v-model:value="formData.updateBy" |
| | | :placeholder="formatMessage('common.select', '请选择')" |
| | | style="width: 100%" |
| | | show-search |
| | | :options="userQueryList" |
| | | optionFilterProp="label" |
| | | optionLabelProp="label" |
| | | > |
| | | </a-select> |
| | | </a-form-item> |
| | | <a-form-item |
| | | :label="formatMessage('db.man_wave_seed.memo', '备注') " |
| | | name="memo" |
| | | style="width: 250px;" |
| | | > |
| | | <a-input |
| | | v-model:value="formData.memo" |
| | | /> |
| | | </a-form-item> |
| | | |
| | | <a-form-item> |
| | | <a-button type="primary" html-type="submit" ref="submitButton" |
| | | style="visibility: hidden;">Submit</a-button> |
| | | </a-form-item> |
| | | </a-form> |
| | | </a-modal> |
| | | </div> |
| | | </template> |
| | | |
| | | <style></style> |
New file |
| | |
| | | <script setup> |
| | | import { getCurrentInstance, ref, computed, reactive } from 'vue'; |
| | | import { useRouter } from "vue-router"; |
| | | import { get, post, postBlob } from '@/utils/request.js' |
| | | import { message, Modal } from 'ant-design-vue'; |
| | | import { logout } from '@/config.js'; |
| | | import EditView from './edit.vue' |
| | | import { formatMessage } from '@/utils/localeUtils.js'; |
| | | import useTableSearch from '@/utils/tableUtils.jsx'; |
| | | const context = getCurrentInstance()?.appContext.config.globalProperties; |
| | | |
| | | const router = useRouter(); |
| | | |
| | | const TABLE_KEY = 'table-waveSeed'; |
| | | let currentPage = 1; |
| | | let pageSize = 10; |
| | | const searchInput = ref("") |
| | | const editChild = ref(null) |
| | | |
| | | const state = reactive({ |
| | | selectedRowKeys: [], |
| | | loading: false, |
| | | }); |
| | | |
| | | let tableData = ref([]); |
| | | getPage(); |
| | | |
| | | const { |
| | | getColumnSearchProps, |
| | | handleResizeColumn, |
| | | } = useTableSearch(); |
| | | |
| | | const columns = [ |
| | | // { |
| | | // title: formatMessage('db.man_wave_seed.site_id', '站点ID'), |
| | | // dataIndex: 'siteId$', |
| | | // width: 140, |
| | | // ellipsis: true, |
| | | // ...getColumnSearchProps('siteId$'), |
| | | // }, |
| | | { |
| | | title: formatMessage('db.man_wave_seed.site_no', '站点编号'), |
| | | dataIndex: 'siteNo', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('siteNo'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_wave_seed.order_detl_id', '订单明细'), |
| | | dataIndex: 'orderDetlId$', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('orderDetlId$'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_wave_seed.anfme', '数量'), |
| | | dataIndex: 'anfme', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('anfme'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_wave_seed.workQty', '复核数量'), |
| | | dataIndex: 'workQty', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('workQty'), |
| | | }, |
| | | // { |
| | | // title: formatMessage('db.man_wave_seed.status', '状态'), |
| | | // dataIndex: 'status$', |
| | | // width: 140, |
| | | // ellipsis: true, |
| | | // ...getColumnSearchProps('status$'), |
| | | // }, |
| | | { |
| | | title: formatMessage('db.man_wave_seed.create_time', '添加时间'), |
| | | dataIndex: 'createTime$', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('createTime$'), |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_wave_seed.create_by', '添加人员'), |
| | | dataIndex: 'createBy$', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('createBy$'), |
| | | }, |
| | | // { |
| | | // title: formatMessage('db.man_wave_seed.update_time', '修改时间'), |
| | | // dataIndex: 'updateTime$', |
| | | // width: 140, |
| | | // ellipsis: true, |
| | | // ...getColumnSearchProps('updateTime$'), |
| | | // }, |
| | | // { |
| | | // title: formatMessage('db.man_wave_seed.update_by', '修改人员'), |
| | | // dataIndex: 'updateBy$', |
| | | // width: 140, |
| | | // ellipsis: true, |
| | | // ...getColumnSearchProps('updateBy$'), |
| | | // }, |
| | | { |
| | | title: formatMessage('db.man_wave_seed.memo', '备注'), |
| | | dataIndex: 'memo', |
| | | width: 140, |
| | | ellipsis: true, |
| | | ...getColumnSearchProps('memo'), |
| | | }, |
| | | |
| | | { |
| | | title: formatMessage('common.operation', '操作'), |
| | | name: 'oper', |
| | | dataIndex: 'oper', |
| | | key: 'oper', |
| | | width: 140, |
| | | fixed: 'right', |
| | | }, |
| | | ]; |
| | | |
| | | const hasSelected = computed(() => state.selectedRowKeys.length > 0); |
| | | const start = () => { |
| | | state.loading = true; |
| | | // ajax request after empty completing |
| | | setTimeout(() => { |
| | | state.loading = false; |
| | | state.selectedRowKeys = []; |
| | | }, 1000); |
| | | }; |
| | | const onSelectChange = selectedRowKeys => { |
| | | // console.log('selectedRowKeys changed: ', selectedRowKeys); |
| | | state.selectedRowKeys = selectedRowKeys; |
| | | }; |
| | | |
| | | function getPage() { |
| | | state.loading = true; |
| | | post('/api/waveSeed/page', { |
| | | current: currentPage, |
| | | pageSize: pageSize, |
| | | condition: searchInput.value |
| | | }).then((resp) => { |
| | | let result = resp.data; |
| | | if (result.code == 200) { |
| | | let data = result.data; |
| | | tableData.value = data; |
| | | |
| | | state.loading = false; |
| | | } else if (result.code === 401) { |
| | | message.error(result.msg); |
| | | logout() |
| | | } else { |
| | | message.error(result.msg); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const handleEdit = (item) => { |
| | | editChild.value.open = true; |
| | | editChild.value.formData = item == null ? editChild.value.initFormData : JSON.parse(JSON.stringify(item)); |
| | | editChild.value.isSave = item == null; |
| | | } |
| | | |
| | | const handleDel = (rows) => { |
| | | Modal.confirm({ |
| | | title: formatMessage('page.delete', '删除'), |
| | | content: formatMessage('page.delete.confirm', '确定删除该项吗?'), |
| | | maskClosable: true, |
| | | onOk: async () => { |
| | | const hide = message.loading(formatMessage('common.loading', '请求中')); |
| | | try { |
| | | post('/api/waveSeed/remove/' + rows.map((row) => row.id).join(','), {}).then(resp => { |
| | | let result = resp.data; |
| | | if (result.code === 200) { |
| | | message.success(result.msg); |
| | | } else { |
| | | message.error(result.msg); |
| | | } |
| | | getPage() |
| | | hide() |
| | | }) |
| | | } catch (error) { |
| | | message.error(formatMessage('common.fail', '请求失败')); |
| | | } |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/waveSeed/export', {}).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | | }) |
| | | }; |
| | | |
| | | const onSearch = () => { |
| | | // console.log('search'); |
| | | getPage() |
| | | } |
| | | |
| | | const onPageChange = (page, size) => { |
| | | currentPage = page; |
| | | pageSize = size; |
| | | getPage(); |
| | | } |
| | | |
| | | function handleTableReload(value) { |
| | | getPage() |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <script> |
| | | export default { |
| | | name: '波次播种' |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <EditView ref="editChild" @tableReload="handleTableReload" /> |
| | | <div class="table-header"> |
| | | <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '请输入')" |
| | | style="width: 200px;" @search="onSearch" /> |
| | | <div class="table-header-right"> |
| | | <!-- <a-button @click="handleEdit(null)" type="primary">{{ formatMessage('page.add', '添加') }}</a-button> --> |
| | | <a-button @click="handleExport">{{ formatMessage('page.export', '导出') }}</a-button> |
| | | </div> |
| | | </div> |
| | | <a-table :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }" |
| | | :data-source="tableData.records" :defaultExpandAllRows="false" :key="TABLE_KEY" rowKey="id" |
| | | :pagination="{ total: tableData.total, onChange: onPageChange }" |
| | | :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="columns" @resizeColumn="handleResizeColumn" |
| | | :loading="state.loading"> |
| | | <template #bodyCell="{ column, text, record }"> |
| | | <template v-if="column.dataIndex === 'oper'"> |
| | | <div style="display: flex;justify-content: space-evenly;"> |
| | | <a-button type="link" primary @click="handleEdit(record)">{{ formatMessage('page.edit', '编辑') }}</a-button> |
| | | <a-button type="link" danger @click="handleDel([record])">{{ formatMessage('page.delete', '删除') |
| | | }}</a-button> |
| | | </div> |
| | | </template> |
| | | </template> |
| | | </a-table> |
| | | </div> |
| | | </template> |
| | | |
| | | <style></style> |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.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.wms.common.annotation.OperationLog; |
| | | import com.zy.asrs.wms.common.domain.BaseParam; |
| | | import com.zy.asrs.wms.common.domain.KeyValVo; |
| | | import com.zy.asrs.wms.common.domain.PageParam; |
| | | import com.zy.asrs.wms.asrs.entity.CacheSite; |
| | | import com.zy.asrs.wms.asrs.service.CacheSiteService; |
| | | import com.zy.asrs.wms.system.controller.BaseController; |
| | | import com.zy.asrs.wms.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 CacheSiteController extends BaseController { |
| | | |
| | | @Autowired |
| | | private CacheSiteService cacheSiteService; |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:cacheSite:list')") |
| | | @PostMapping("/cacheSite/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<CacheSite, BaseParam> pageParam = new PageParam<>(baseParam, CacheSite.class); |
| | | return R.ok().add(cacheSiteService.page(pageParam, pageParam.buildWrapper(true))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:cacheSite:list')") |
| | | @PostMapping("/cacheSite/list") |
| | | public R list(@RequestBody Map<String, Object> map) { |
| | | return R.ok().add(cacheSiteService.list()); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:cacheSite:list')") |
| | | @GetMapping("/cacheSite/{id}") |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok().add(cacheSiteService.getById(id)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:cacheSite:save')") |
| | | @OperationLog("添加缓存站点") |
| | | @PostMapping("/cacheSite/save") |
| | | public R save(@RequestBody CacheSite cacheSite) { |
| | | if (!cacheSiteService.save(cacheSite)) { |
| | | return R.error("添加失败"); |
| | | } |
| | | return R.ok("添加成功"); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:cacheSite:update')") |
| | | @OperationLog("修改缓存站点") |
| | | @PostMapping("/cacheSite/update") |
| | | public R update(@RequestBody CacheSite cacheSite) { |
| | | if (!cacheSiteService.updateById(cacheSite)) { |
| | | return R.error("修改失败"); |
| | | } |
| | | return R.ok("修改成功"); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:cacheSite:remove')") |
| | | @OperationLog("删除缓存站点") |
| | | @PostMapping("/cacheSite/remove/{ids}") |
| | | public R remove(@PathVariable Long[] ids) { |
| | | if (!cacheSiteService.removeByIds(Arrays.asList(ids))) { |
| | | return R.error("删除失败"); |
| | | } |
| | | return R.ok("删除成功"); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:cacheSite:list')") |
| | | @PostMapping("/cacheSite/query") |
| | | public R query(@RequestParam(required = false) String condition) { |
| | | List<KeyValVo> vos = new ArrayList<>(); |
| | | LambdaQueryWrapper<CacheSite> wrapper = new LambdaQueryWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(CacheSite::getId, condition); |
| | | } |
| | | cacheSiteService.page(new Page<>(1, 30), wrapper).getRecords().forEach( |
| | | item -> vos.add(new KeyValVo(item.getId(), item.getId())) |
| | | ); |
| | | return R.ok().add(vos); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:cacheSite:list')") |
| | | @PostMapping("/cacheSite/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(cacheSiteService.list(), CacheSite.class), response); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.zy.asrs.wms.asrs.entity.dto.MergePreviewDto; |
| | | import com.zy.asrs.wms.asrs.entity.dto.MergePreviewResultDto; |
| | | import com.zy.asrs.wms.asrs.entity.dto.OrderOutBatchPreviewDto; |
| | | import com.zy.asrs.wms.asrs.entity.param.OrderOutBatchPreviewParam; |
| | | import com.zy.asrs.wms.asrs.entity.param.OrderOutMergeParam; |
| | | import com.zy.asrs.wms.asrs.entity.param.OrderOutMergePreviewParam; |
| | | import com.zy.asrs.wms.asrs.entity.param.OutParam; |
| | | import com.zy.asrs.wms.asrs.entity.param.*; |
| | | import com.zy.asrs.wms.asrs.manage.OutManage; |
| | | import com.zy.asrs.wms.common.annotation.OperationLog; |
| | | import com.zy.asrs.wms.system.controller.BaseController; |
| | |
| | | @PostMapping("/out/orderOut/merge") |
| | | @OperationLog("合并订单出库") |
| | | @Transactional |
| | | public R orderOutMerge(@RequestBody List<OrderOutMergeParam> param) { |
| | | public R orderOutMerge(@RequestBody OrderOutMergeParamDto param) { |
| | | outManage.orderOutMerge(param); |
| | | return R.ok(); |
| | | } |
| | |
| | | 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.wms.asrs.entity.TaskDetl; |
| | | import com.zy.asrs.wms.asrs.entity.WaveDetl; |
| | | import com.zy.asrs.wms.asrs.service.TaskDetlService; |
| | | import com.zy.asrs.wms.asrs.service.WaveDetlService; |
| | | import com.zy.asrs.wms.common.annotation.OperationLog; |
| | | import com.zy.asrs.wms.common.domain.BaseParam; |
| | |
| | | private WaveService waveService; |
| | | @Autowired |
| | | private WaveDetlService waveDetlService; |
| | | @Autowired |
| | | private TaskDetlService taskDetlService; |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:wave:list')") |
| | | @PostMapping("/wave/page") |
| | |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<Wave, BaseParam> pageParam = new PageParam<>(baseParam, Wave.class); |
| | | PageParam<Wave, BaseParam> page = waveService.page(pageParam, pageParam.buildWrapper(true)); |
| | | |
| | | List<Wave> records = page.getRecords(); |
| | | for (Wave record : records) { |
| | | ArrayList<Long> orderDetlIds = new ArrayList<>(); |
| | | for (WaveDetl waveDetl : record.getWaveDetlList()) { |
| | | orderDetlIds.add(waveDetl.getOrderId()); |
| | | } |
| | | |
| | | List<TaskDetl> taskDetls = taskDetlService.list(new LambdaQueryWrapper<TaskDetl>().in(TaskDetl::getOrderId, orderDetlIds)); |
| | | if (taskDetls.isEmpty()) { |
| | | record.setGenerateTask(false); |
| | | }else { |
| | | record.setGenerateTask(true); |
| | | } |
| | | } |
| | | return R.ok().add(page); |
| | | } |
| | | |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.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.wms.common.annotation.OperationLog; |
| | | import com.zy.asrs.wms.common.domain.BaseParam; |
| | | import com.zy.asrs.wms.common.domain.KeyValVo; |
| | | import com.zy.asrs.wms.common.domain.PageParam; |
| | | import com.zy.asrs.wms.asrs.entity.WaveSeed; |
| | | import com.zy.asrs.wms.asrs.service.WaveSeedService; |
| | | import com.zy.asrs.wms.system.controller.BaseController; |
| | | import com.zy.asrs.wms.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 WaveSeedController extends BaseController { |
| | | |
| | | @Autowired |
| | | private WaveSeedService waveSeedService; |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:waveSeed:list')") |
| | | @PostMapping("/waveSeed/page") |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<WaveSeed, BaseParam> pageParam = new PageParam<>(baseParam, WaveSeed.class); |
| | | return R.ok().add(waveSeedService.page(pageParam, pageParam.buildWrapper(true))); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:waveSeed:list')") |
| | | @PostMapping("/waveSeed/list") |
| | | public R list(@RequestBody Map<String, Object> map) { |
| | | return R.ok().add(waveSeedService.list()); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:waveSeed:list')") |
| | | @GetMapping("/waveSeed/{id}") |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok().add(waveSeedService.getById(id)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:waveSeed:save')") |
| | | @OperationLog("添加波次播种") |
| | | @PostMapping("/waveSeed/save") |
| | | public R save(@RequestBody WaveSeed waveSeed) { |
| | | if (!waveSeedService.save(waveSeed)) { |
| | | return R.error("添加失败"); |
| | | } |
| | | return R.ok("添加成功"); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:waveSeed:update')") |
| | | @OperationLog("修改波次播种") |
| | | @PostMapping("/waveSeed/update") |
| | | public R update(@RequestBody WaveSeed waveSeed) { |
| | | if (!waveSeedService.updateById(waveSeed)) { |
| | | return R.error("修改失败"); |
| | | } |
| | | return R.ok("修改成功"); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:waveSeed:remove')") |
| | | @OperationLog("删除波次播种") |
| | | @PostMapping("/waveSeed/remove/{ids}") |
| | | public R remove(@PathVariable Long[] ids) { |
| | | if (!waveSeedService.removeByIds(Arrays.asList(ids))) { |
| | | return R.error("删除失败"); |
| | | } |
| | | return R.ok("删除成功"); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:waveSeed:list')") |
| | | @PostMapping("/waveSeed/query") |
| | | public R query(@RequestParam(required = false) String condition) { |
| | | List<KeyValVo> vos = new ArrayList<>(); |
| | | LambdaQueryWrapper<WaveSeed> wrapper = new LambdaQueryWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like(WaveSeed::getId, condition); |
| | | } |
| | | waveSeedService.page(new Page<>(1, 30), wrapper).getRecords().forEach( |
| | | item -> vos.add(new KeyValVo(item.getId(), item.getId())) |
| | | ); |
| | | return R.ok().add(vos); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:waveSeed:list')") |
| | | @PostMapping("/waveSeed/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(waveSeedService.list(), WaveSeed.class), response); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.zy.asrs.wms.asrs.service.OrderService; |
| | | import com.zy.asrs.wms.system.entity.Host; |
| | | import com.zy.asrs.wms.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.wms.system.service.UserService; |
| | | import com.zy.asrs.wms.system.service.HostService; |
| | | import com.zy.asrs.common.utils.Synchro; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("man_cache_site") |
| | | public class CacheSite 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 siteNo; |
| | | |
| | | /** |
| | | * 站点状态 0: 空站 1: 满站 2: 预约 |
| | | */ |
| | | @ApiModelProperty(value= "站点状态 0: 空站 1: 满站 2: 预约 ") |
| | | private Integer siteStatus; |
| | | |
| | | /** |
| | | * 订单ID |
| | | */ |
| | | @ApiModelProperty(value= "订单ID") |
| | | private Long orderId; |
| | | |
| | | /** |
| | | * 订单编号 |
| | | */ |
| | | @ApiModelProperty(value= "订单编号") |
| | | private String orderNo; |
| | | |
| | | /** |
| | | * 所属机构 |
| | | */ |
| | | @ApiModelProperty(value= "所属机构") |
| | | private Long hostId; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 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; |
| | | |
| | | public CacheSite() {} |
| | | |
| | | public CacheSite(String siteNo,Integer siteStatus,Long orderId,String orderNo,Long hostId,Integer status,Integer deleted,Date createTime,Long createBy,Date updateTime,Long updateBy,String memo) { |
| | | this.siteNo = siteNo; |
| | | this.siteStatus = siteStatus; |
| | | this.orderId = orderId; |
| | | this.orderNo = orderNo; |
| | | this.hostId = hostId; |
| | | this.status = status; |
| | | this.deleted = deleted; |
| | | this.createTime = createTime; |
| | | this.createBy = createBy; |
| | | this.updateTime = updateTime; |
| | | this.updateBy = updateBy; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | // CacheSite cacheSite = new CacheSite( |
| | | // null, // 站点编号 |
| | | // null, // 站点状态 |
| | | // null, // 订单ID |
| | | // null, // 订单编号 |
| | | // null, // 所属机构 |
| | | // null, // 状态 |
| | | // null, // 是否删除 |
| | | // null, // 添加时间 |
| | | // null, // 添加人员 |
| | | // null, // 修改时间 |
| | | // null, // 修改人员 |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getSiteStatus$(){ |
| | | if (null == this.siteStatus){ return null; } |
| | | switch (this.siteStatus){ |
| | | case 0: |
| | | return "空站"; |
| | | case 1: |
| | | return "满站"; |
| | | case 2: |
| | | return "预约"; |
| | | default: |
| | | return String.valueOf(this.siteStatus); |
| | | } |
| | | } |
| | | |
| | | public String getOrderId$(){ |
| | | OrderService service = SpringUtils.getBean(OrderService.class); |
| | | Order order = service.getById(this.orderId); |
| | | if (!Cools.isEmpty(order)){ |
| | | return String.valueOf(order.getId()); |
| | | } |
| | | return 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 "正常"; |
| | | 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; |
| | | } |
| | | |
| | | |
| | | |
| | | public void sync(Object source) { |
| | | Synchro.Copy(source, this); |
| | | } |
| | | } |
| | |
| | | package com.zy.asrs.wms.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | |
| | | 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; |
| | |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | @TableField(exist = false) |
| | | private Boolean generateTask; |
| | | |
| | | public Wave() {} |
| | | |
| | | public Wave(String waveNo,Integer waveType,Long hostId,Integer status,Integer deleted,Date createTime,Long createBy,Date updateTime,Long updateBy,String memo) { |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.zy.asrs.wms.asrs.service.CacheSiteService; |
| | | import com.zy.asrs.wms.asrs.service.OrderDetlService; |
| | | import com.zy.asrs.wms.asrs.service.TaskDetlService; |
| | | import com.zy.asrs.wms.system.entity.Host; |
| | | import com.zy.asrs.wms.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.wms.system.service.UserService; |
| | | import com.zy.asrs.wms.system.service.HostService; |
| | | import com.zy.asrs.common.utils.Synchro; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("man_wave_seed") |
| | | public class WaveSeed 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 Long siteId; |
| | | |
| | | /** |
| | | * 站点编号 |
| | | */ |
| | | @ApiModelProperty(value= "站点编号") |
| | | private String siteNo; |
| | | |
| | | /** |
| | | * 订单明细 |
| | | */ |
| | | @ApiModelProperty(value= "订单明细") |
| | | private Long orderDetlId; |
| | | |
| | | /** |
| | | * 任务明细 |
| | | */ |
| | | @ApiModelProperty(value= "任务明细") |
| | | private Long taskDetlId; |
| | | |
| | | /** |
| | | * 数量 |
| | | */ |
| | | @ApiModelProperty(value= "数量") |
| | | private Double anfme; |
| | | |
| | | /** |
| | | * 工作数量 |
| | | */ |
| | | @ApiModelProperty(value= "工作数量") |
| | | private Double workQty; |
| | | |
| | | /** |
| | | * 所属机构 |
| | | */ |
| | | @ApiModelProperty(value= "所属机构") |
| | | private Long hostId; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 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; |
| | | |
| | | public WaveSeed() {} |
| | | |
| | | public WaveSeed(Long siteId,String siteNo,Long orderDetlId,Double anfme,Long hostId,Integer status,Integer deleted,Date createTime,Long createBy,Date updateTime,Long updateBy,String memo) { |
| | | this.siteId = siteId; |
| | | this.siteNo = siteNo; |
| | | this.orderDetlId = orderDetlId; |
| | | this.anfme = anfme; |
| | | this.hostId = hostId; |
| | | this.status = status; |
| | | this.deleted = deleted; |
| | | this.createTime = createTime; |
| | | this.createBy = createBy; |
| | | this.updateTime = updateTime; |
| | | this.updateBy = updateBy; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | // WaveSeed waveSeed = new WaveSeed( |
| | | // null, // 站点ID |
| | | // null, // 站点编号 |
| | | // null, // 订单明细 |
| | | // null, // 数量 |
| | | // null, // 所属机构 |
| | | // null, // 状态 |
| | | // null, // 是否删除 |
| | | // null, // 添加时间 |
| | | // null, // 添加人员 |
| | | // null, // 修改时间 |
| | | // null, // 修改人员 |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getSiteId$(){ |
| | | CacheSiteService service = SpringUtils.getBean(CacheSiteService.class); |
| | | CacheSite cacheSite = service.getById(this.siteId); |
| | | if (!Cools.isEmpty(cacheSite)){ |
| | | return String.valueOf(cacheSite.getId()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getOrderDetlId$(){ |
| | | OrderDetlService service = SpringUtils.getBean(OrderDetlService.class); |
| | | OrderDetl orderDetl = service.getById(this.orderDetlId); |
| | | if (!Cools.isEmpty(orderDetl)){ |
| | | return String.valueOf(orderDetl.getId()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public OrderDetl getOrderDetl$(){ |
| | | OrderDetlService service = SpringUtils.getBean(OrderDetlService.class); |
| | | OrderDetl orderDetl = service.getById(this.orderDetlId); |
| | | if (!Cools.isEmpty(orderDetl)){ |
| | | return orderDetl; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public TaskDetl getTaskDetl$(){ |
| | | TaskDetlService service = SpringUtils.getBean(TaskDetlService.class); |
| | | TaskDetl taskDetl = service.getById(this.taskDetlId); |
| | | if (!Cools.isEmpty(taskDetl)){ |
| | | return taskDetl; |
| | | } |
| | | return 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 "正常"; |
| | | 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; |
| | | } |
| | | |
| | | |
| | | |
| | | public void sync(Object source) { |
| | | Synchro.Copy(source, this); |
| | | } |
| | | } |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.entity.enums; |
| | | |
| | | public enum CacheSiteStatusType { |
| | | |
| | | O(0, "空站"), |
| | | F(1, "满站"), |
| | | R(2, "预约"), |
| | | ; |
| | | |
| | | |
| | | public Integer id; |
| | | public String desc; |
| | | |
| | | CacheSiteStatusType(Integer id, String desc) { |
| | | this.id = id; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class OrderOutMergeParam { |
| | | public class OrderOutMergeParam implements Serializable { |
| | | |
| | | private Long locId; |
| | | |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.entity.param; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class OrderOutMergeParamDto { |
| | | |
| | | private Long waveId; |
| | | |
| | | private List<OrderOutMergeParam> list; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.zy.asrs.framework.exception.CoolException; |
| | | import com.zy.asrs.wms.asrs.entity.dto.*; |
| | | import com.zy.asrs.wms.asrs.entity.dto.OrderOutMergeDto; |
| | | import com.zy.asrs.wms.asrs.entity.enums.CacheSiteStatusType; |
| | | import com.zy.asrs.wms.asrs.entity.enums.LocStsType; |
| | | import com.zy.asrs.wms.asrs.entity.enums.OrderSettleType; |
| | | import com.zy.asrs.wms.asrs.entity.param.*; |
| | | import com.zy.asrs.wms.asrs.entity.*; |
| | | import com.zy.asrs.wms.asrs.service.*; |
| | |
| | | private WaveService waveService; |
| | | @Autowired |
| | | private WaveDetlService waveDetlService; |
| | | @Autowired |
| | | private CacheSiteService cacheSiteService; |
| | | @Autowired |
| | | private WaveSeedService waveSeedService; |
| | | |
| | | /** |
| | | * 出库 |
| | |
| | | } |
| | | |
| | | @Transactional |
| | | public void orderOutMerge(List<OrderOutMergeParam> params) { |
| | | if(params == null){ |
| | | public void orderOutMerge(OrderOutMergeParamDto dto) { |
| | | if(dto == null){ |
| | | throw new CoolException("参数不能为空"); |
| | | } |
| | | |
| | | List<OrderOutMergeParam> params = dto.getList(); |
| | | |
| | | if (params.isEmpty()) { |
| | | throw new CoolException("参数不能为空"); |
| | |
| | | map.put(orderOutMergeDto.getLocId(), list); |
| | | } |
| | | |
| | | List<TaskDetl> taskDetls = new ArrayList<>(); |
| | | for (Map.Entry<Long, List<OrderOutMergeDto>> entry : map.entrySet()) { |
| | | Long locId = entry.getKey(); |
| | | List<OrderOutMergeDto> list = entry.getValue(); |
| | |
| | | throw new CoolException("明细扩展生成失败"); |
| | | } |
| | | } |
| | | |
| | | taskDetls.add(taskDetl); |
| | | } |
| | | |
| | | //库位F => R |
| | |
| | | |
| | | } |
| | | |
| | | if (dto.getWaveId() != null) { |
| | | HashMap<Long, List<TaskDetl>> orderMap = new HashMap<>(); |
| | | for (TaskDetl taskDetl : taskDetls) { |
| | | Long orderId = taskDetl.getOrderId(); |
| | | |
| | | List<TaskDetl> list = orderMap.get(orderId); |
| | | if (list == null) { |
| | | list = new ArrayList<>(); |
| | | } |
| | | |
| | | list.add(taskDetl); |
| | | orderMap.put(orderId, list); |
| | | } |
| | | |
| | | for (Map.Entry<Long, List<TaskDetl>> entry : orderMap.entrySet()) { |
| | | List<TaskDetl> list = entry.getValue(); |
| | | |
| | | List<CacheSite> cacheSites = cacheSiteService.list(new LambdaQueryWrapper<CacheSite>().eq(CacheSite::getSiteStatus, CacheSiteStatusType.O.id)); |
| | | if (cacheSites.isEmpty()) { |
| | | throw new CoolException("缓存站空间不足,请稍后再试"); |
| | | } |
| | | CacheSite cacheSite = cacheSites.get(0); |
| | | |
| | | Long orderId = null; |
| | | String orderNo = null; |
| | | for (TaskDetl taskDetl : list) { |
| | | orderId = taskDetl.getOrderId(); |
| | | orderNo = taskDetl.getOrderNo(); |
| | | Long orderDetlId = taskDetl.getDetlId(); |
| | | |
| | | WaveSeed waveSeed = new WaveSeed(); |
| | | waveSeed.setSiteId(cacheSite.getId()); |
| | | waveSeed.setSiteNo(cacheSite.getSiteNo()); |
| | | waveSeed.setOrderDetlId(orderDetlId); |
| | | waveSeed.setTaskDetlId(taskDetl.getId()); |
| | | waveSeed.setAnfme(taskDetl.getAnfme()); |
| | | waveSeed.setWorkQty(0D); |
| | | if (!waveSeedService.save(waveSeed)) { |
| | | throw new CoolException("波次播种创建失败"); |
| | | } |
| | | } |
| | | |
| | | if(orderId == null){ |
| | | continue; |
| | | } |
| | | |
| | | cacheSite.setOrderId(orderId); |
| | | cacheSite.setOrderNo(orderNo); |
| | | cacheSite.setSiteStatus(CacheSiteStatusType.R.id); |
| | | cacheSite.setUpdateTime(new Date()); |
| | | if (!cacheSiteService.updateById(cacheSite)) { |
| | | throw new CoolException("缓存站更新失败"); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.mapper; |
| | | |
| | | import com.zy.asrs.wms.asrs.entity.CacheSite; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface CacheSiteMapper extends BaseMapper<CacheSite> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.mapper; |
| | | |
| | | import com.zy.asrs.wms.asrs.entity.WaveSeed; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface WaveSeedMapper extends BaseMapper<WaveSeed> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.wms.asrs.entity.CacheSite; |
| | | |
| | | public interface CacheSiteService extends IService<CacheSite> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.zy.asrs.wms.asrs.entity.WaveSeed; |
| | | |
| | | public interface WaveSeedService extends IService<WaveSeed> { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.service.impl; |
| | | |
| | | import com.zy.asrs.wms.asrs.mapper.CacheSiteMapper; |
| | | import com.zy.asrs.wms.asrs.entity.CacheSite; |
| | | import com.zy.asrs.wms.asrs.service.CacheSiteService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("cacheSiteService") |
| | | public class CacheSiteServiceImpl extends ServiceImpl<CacheSiteMapper, CacheSite> implements CacheSiteService { |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.wms.asrs.service.impl; |
| | | |
| | | import com.zy.asrs.wms.asrs.mapper.WaveSeedMapper; |
| | | import com.zy.asrs.wms.asrs.entity.WaveSeed; |
| | | import com.zy.asrs.wms.asrs.service.WaveSeedService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("waveSeedService") |
| | | public class WaveSeedServiceImpl extends ServiceImpl<WaveSeedMapper, WaveSeed> implements WaveSeedService { |
| | | |
| | | } |
| | |
| | | // generator.username="sa"; |
| | | // generator.password="Zoneyung@zy56$"; |
| | | |
| | | generator.table="view_work_count_in"; |
| | | generator.tableName="日入库汇总查询"; |
| | | generator.table="man_wave_seed"; |
| | | generator.tableName="波次播种"; |
| | | generator.rootPackagePath="com.zy.asrs.wms"; |
| | | generator.packagePath="com.zy.asrs.wms.asrs"; |
| | | |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.asrs.wms.asrs.mapper.CacheSiteMapper"> |
| | | |
| | | </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.zy.asrs.wms.asrs.mapper.WaveSeedMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | -- save cacheSite record |
| | | -- mysql |
| | | insert into `sys_menu` ( `name`, `parent_id`, `route`, `component`, `type`, `sort`, `host_id`, `status`) values ( '缓存站点管理', '0', '/asrs/cacheSite', '/asrs/cacheSite', '0' , '0', '1' , '1'); |
| | | |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `host_id`, `status`) values ( '查询缓存站点', '', '1', 'asrs:cacheSite:list', '0', '1', '1'); |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `host_id`, `status`) values ( '添加缓存站点', '', '1', 'asrs:cacheSite:save', '1', '1', '1'); |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `host_id`, `status`) values ( '修改缓存站点', '', '1', 'asrs:cacheSite:update', '2', '1', '1'); |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `host_id`, `status`) values ( '删除缓存站点', '', '1', 'asrs:cacheSite:remove', '3', '1', '1'); |
| | | |
New file |
| | |
| | | -- save waveSeed record |
| | | -- mysql |
| | | insert into `sys_menu` ( `name`, `parent_id`, `route`, `component`, `type`, `sort`, `host_id`, `status`) values ( '波次播种管理', '0', '/asrs/waveSeed', '/asrs/waveSeed', '0' , '0', '1' , '1'); |
| | | |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `host_id`, `status`) values ( '查询波次播种', '', '1', 'asrs:waveSeed:list', '0', '1', '1'); |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `host_id`, `status`) values ( '添加波次播种', '', '1', 'asrs:waveSeed:save', '1', '1', '1'); |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `host_id`, `status`) values ( '修改波次播种', '', '1', 'asrs:waveSeed:update', '2', '1', '1'); |
| | | insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `host_id`, `status`) values ( '删除波次播种', '', '1', 'asrs:waveSeed:remove', '3', '1', '1'); |
| | | |