| | |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/order/export', { |
| | | ioModel: props.ioModel |
| | | ioModel: props.ioModel, |
| | | condition: searchInput.value, |
| | | _param: searchParam.value, |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/order/export', { |
| | | ioModel: props.ioModel |
| | | ioModel: props.ioModel, |
| | | condition: searchInput.value, |
| | | _param: searchParam.value, |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/order/export', { |
| | | ioModel: props.ioModel |
| | | ioModel: props.ioModel, |
| | | condition: searchInput.value, |
| | | _param: searchParam.value, |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/orderLog/export', { |
| | | ioModel: props.ioModel |
| | | ioModel: props.ioModel, |
| | | condition: searchInput.value, |
| | | _param: searchParam.value, |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/loc/export', {}).then(result => { |
| | | postBlob('/api/loc/export', { |
| | | condition: searchInput.value, |
| | | _param: searchParam.value, |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | |
| | | <script setup> |
| | | import {getCurrentInstance, ref, computed, reactive} from 'vue'; |
| | | import {useRouter} from "vue-router"; |
| | | import {get, post, postBlob, postForm} from '@/utils/request.js' |
| | | import {message, Modal} from 'ant-design-vue'; |
| | | import {globalState, logout} from '@/config.js'; |
| | | import { getCurrentInstance, ref, computed, reactive } from 'vue'; |
| | | import { useRouter } from "vue-router"; |
| | | import { get, post, postBlob, postForm } from '@/utils/request.js' |
| | | import { message, Modal } from 'ant-design-vue'; |
| | | import { globalState, logout } from '@/config.js'; |
| | | import EditView from './edit.vue' |
| | | import {formatMessage} from '@/utils/localeUtils.js'; |
| | | import { formatMessage } from '@/utils/localeUtils.js'; |
| | | import useTableSearch from '@/utils/tableUtils.jsx'; |
| | | import MatPrint from '@/components/print/matPrint/index.vue'; |
| | | import { |
| | |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/mat/export', {}).then(result => { |
| | | const blob = new Blob([result.data], {type: 'application/vnd.ms-excel'}); |
| | | postBlob('/api/mat/export', { |
| | | condition: searchInput.value, |
| | | _param: searchParam.value, |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | | }) |
| | |
| | | const exportTemplate = () => { |
| | | //模板导出 |
| | | postBlob('/api/mat/exportTemplate', {}).then(result => { |
| | | const blob = new Blob([result.data], {type: 'application/vnd.ms-excel'}); |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | | }) |
| | |
| | | }; |
| | | |
| | | const handlePrint = () => { |
| | | if (state.selectedRowKeys.length == 0) { |
| | | message.warning(formatMessage('common.select', '请选择')); |
| | | return; |
| | | if (state.selectedRowKeys.length == 0) { |
| | | message.warning(formatMessage('common.select', '请选择')); |
| | | return; |
| | | } |
| | | let data = tableData.value.records; |
| | | let tmp = []; |
| | | data.forEach((item) => { |
| | | if (state.selectedRowKeys.indexOf(item.id) != -1) { |
| | | tmp.push(item); |
| | | } |
| | | let data = tableData.value.records; |
| | | let tmp = []; |
| | | data.forEach((item) => { |
| | | if (state.selectedRowKeys.indexOf(item.id) != -1) { |
| | | tmp.push(item); |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | printChild.value.printData = tmp; |
| | | printChild.value.open = true; |
| | | printChild.value.printData = tmp; |
| | | printChild.value.open = true; |
| | | } |
| | | |
| | | </script> |
| | |
| | | |
| | | <template> |
| | | <div> |
| | | <EditView ref="editChild" @tableReload="handleTableReload"/> |
| | | <EditView ref="editChild" @tableReload="handleTableReload" /> |
| | | <div class="table-header"> |
| | | <div> |
| | | <a-input v-model:value="searchParam.matnr" |
| | | :placeholder="formatMessage('page.mat.matnr.input', '请输入商品编号')" |
| | | style="width: 140px;margin-right: 10px;"/> |
| | | <a-input v-model:value="searchParam.maktx" |
| | | :placeholder="formatMessage('page.mat.matnr.input', '请输入商品名称')" |
| | | style="width: 140px;margin-right: 10px;"/> |
| | | <a-input v-model:value="searchParam.matnr" :placeholder="formatMessage('page.mat.matnr.input', '请输入商品编号')" |
| | | style="width: 140px;margin-right: 10px;" /> |
| | | <a-input v-model:value="searchParam.maktx" :placeholder="formatMessage('page.mat.matnr.input', '请输入商品名称')" |
| | | style="width: 140px;margin-right: 10px;" /> |
| | | <a-input v-model:value="searchParam.specs" :placeholder="formatMessage('page.mat.matnr.input', '请输入规格')" |
| | | style="width: 140px;margin-right: 10px;"/> |
| | | style="width: 140px;margin-right: 10px;" /> |
| | | <a-input v-model:value="searchParam.model" :placeholder="formatMessage('page.mat.matnr.input', '请输入型号')" |
| | | style="width: 140px;margin-right: 10px;"/> |
| | | style="width: 140px;margin-right: 10px;" /> |
| | | |
| | | <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '请输入')" |
| | | style="width: 200px;" @search="onSearch"/> |
| | | style="width: 200px;" @search="onSearch" /> |
| | | </div> |
| | | <div class="table-header-right"> |
| | | <a-dropdown> |
| | |
| | | <a-menu @click="handleSyncMatClick"> |
| | | <a-menu-item key="import"> |
| | | <a-upload v-model:file-list="fileList" name="file" action="/api/mat/upload" @change="handleUploadChange" |
| | | :showUploadList="false" :headers="{ |
| | | :showUploadList="false" :headers="{ |
| | | Authorization: globalState.token |
| | | }"> |
| | | <UploadOutlined/> |
| | | <UploadOutlined /> |
| | | {{ formatMessage('page.mat.import', '商品导入') }} |
| | | </a-upload> |
| | | </a-menu-item> |
| | | |
| | | <a-menu-item key="export"> |
| | | <DownloadOutlined/> |
| | | <DownloadOutlined /> |
| | | {{ formatMessage('page.mat.export.template', '导出模板') }} |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </template> |
| | | <a-button> |
| | | {{ formatMessage('page.mat.sync', '数据同步') }} |
| | | <DownOutlined/> |
| | | <DownOutlined /> |
| | | </a-button> |
| | | </a-dropdown> |
| | | <a-button @click="handlePrint()" type="primary"> |
| | |
| | | </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, showTotal: showTotalPage, onChange: onPageChange }" |
| | | :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="state.columns" |
| | | @resizeColumn="handleResizeColumn" |
| | | :loading="state.loading"> |
| | | :data-source="tableData.records" :defaultExpandAllRows="false" :key="TABLE_KEY" rowKey="id" |
| | | :pagination="{ total: tableData.total, showTotal: showTotalPage, onChange: onPageChange }" |
| | | :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="handleEdit(record)">{{ |
| | | formatMessage('page.edit', '编辑') |
| | | }} |
| | | formatMessage('page.edit', '编辑') |
| | | }} |
| | | </a-button> |
| | | <a-button type="link" danger @click="handleDel([record])"> |
| | | {{ formatMessage('page.delete', '删除') }} |
| | |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/waitPakin/export', {}).then(result => { |
| | | postBlob('/api/waitPakin/export', { |
| | | condition: searchInput.value, |
| | | _param: searchParam.value, |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/waitPakinLog/export', {}).then(result => { |
| | | postBlob('/api/waitPakinLog/export', { |
| | | condition: searchInput.value, |
| | | _param: searchParam.value, |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/loc/export', {}).then(result => { |
| | | postBlob('/api/loc/export', { |
| | | condition: searchInput.value, |
| | | _param: searchParam.value, |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/locDetl/export', {}).then(result => { |
| | | postBlob('/api/locDetl/export', { |
| | | condition: searchInput.value, |
| | | _param: searchParam.value, |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/viewInOut/export', {}).then(result => { |
| | | postBlob('/api/viewInOut/export', { |
| | | condition: searchInput.value |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/viewStayTime/export', {}).then(result => { |
| | | postBlob('/api/viewStayTime/export', { |
| | | condition: searchInput.value |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/viewWorkCountIn/export', {}).then(result => { |
| | | postBlob('/api/viewWorkCountIn/export', { |
| | | condition: searchInput.value |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/viewWorkCountOut/export', {}).then(result => { |
| | | postBlob('/api/viewWorkCountOut/export', { |
| | | condition: searchInput.value |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/viewWorkIn/export', {}).then(result => { |
| | | postBlob('/api/viewWorkIn/export', { |
| | | condition: searchInput.value |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/viewWorkOut/export', {}).then(result => { |
| | | postBlob('/api/viewWorkOut/export', { |
| | | condition: searchInput.value |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/orderDetl/export', {}).then(result => { |
| | | postBlob('/api/orderDetl/export', { |
| | | condition: searchInput.value |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/orderDetlLog/export', {}).then(result => { |
| | | postBlob('/api/orderDetlLog/export', { |
| | | condition: searchInput.value |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/orderLog/export', {}).then(result => { |
| | | postBlob('/api/orderLog/export', { |
| | | condition: searchInput.value |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/cacheStatistics/export', {}).then(result => { |
| | | postBlob('/api/cacheStatistics/export', { |
| | | condition: searchInput.value |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/language/export', {}).then(result => { |
| | | postBlob('/api/language/export', { |
| | | condition: searchInput.value |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/operationRecord/export', {}).then(result => { |
| | | postBlob('/api/operationRecord/export', { |
| | | condition: searchInput.value |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/userLogin/export', {}).then(result => { |
| | | postBlob('/api/userLogin/export', { |
| | | condition: searchInput.value |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/task/export', {}).then(result => { |
| | | postBlob('/api/task/export', { |
| | | condition: searchInput.value, |
| | | _param: searchParam.value, |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/taskDetl/export', {}).then(result => { |
| | | postBlob('/api/taskDetl/export', { |
| | | condition: searchInput.value |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/taskDetlLog/export', {}).then(result => { |
| | | postBlob('/api/taskDetlLog/export', { |
| | | condition: searchInput.value |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/taskLog/export', {}).then(result => { |
| | | postBlob('/api/taskLog/export', { |
| | | condition: searchInput.value, |
| | | _param: searchParam.value, |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | |
| | | @PreAuthorize("hasAuthority('@{ITEMNAME}:@{SIMPLEENTITYNAME}:list')") |
| | | @PostMapping("/@{SIMPLEENTITYNAME}/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(@{SIMPLEENTITYNAME}Service.list(), @{ENTITYNAME}.class), response); |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<@{ENTITYNAME}, BaseParam> pageParam = new PageParam<>(baseParam, @{ENTITYNAME}.class); |
| | | List<@{ENTITYNAME}> data = @{SIMPLEENTITYNAME}Service.list(pageParam.buildWrapper(true)); |
| | | |
| | | ExcelUtil.build(ExcelUtil.create(data, @{ENTITYNAME}.class), response); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | const handleExport = async (intl) => { |
| | | postBlob('/api/@{SIMPLEENTITYNAME}/export', {}).then(result => { |
| | | postBlob('/api/@{SIMPLEENTITYNAME}/export', { |
| | | condition: searchInput.value |
| | | }).then(result => { |
| | | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); |
| | | window.location.href = window.URL.createObjectURL(blob); |
| | | return true; |
| | |
| | | @PreAuthorize("hasAuthority('asrs:cacheStatistics:list')") |
| | | @PostMapping("/cacheStatistics/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(cacheStatisticsService.list(), CacheStatistics.class), response); |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<CacheStatistics, BaseParam> pageParam = new PageParam<>(baseParam, CacheStatistics.class); |
| | | List<CacheStatistics> data = cacheStatisticsService.list(pageParam.buildWrapper(true)); |
| | | |
| | | ExcelUtil.build(ExcelUtil.create(data, CacheStatistics.class), response); |
| | | } |
| | | |
| | | } |
| | |
| | | @PreAuthorize("hasAuthority('asrs:loc:list')") |
| | | @PostMapping("/loc/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(locService.list(), Loc.class), response); |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<Loc, BaseParam> pageParam = new PageParam<>(baseParam, Loc.class); |
| | | List<Loc> data = locService.list(pageParam.buildWrapper(true)); |
| | | |
| | | ExcelUtil.build(ExcelUtil.create(data, Loc.class), response); |
| | | } |
| | | |
| | | } |
| | |
| | | @PreAuthorize("hasAuthority('asrs:locDetl:list')") |
| | | @PostMapping("/locDetl/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | List<LocDetl> locDetls = locDetlService.parseLocDetl(locDetlService.list()); |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<LocDetl, BaseParam> pageParam = new PageParam<>(baseParam, LocDetl.class); |
| | | List<LocDetl> data = locDetlService.list(pageParam.buildWrapper(true)); |
| | | |
| | | List<LocDetl> locDetls = locDetlService.parseLocDetl(data); |
| | | List<MatField> locFields = matFieldService.getLocFields(); |
| | | ExcelUtil.build(ExcelUtil.create(locDetls, LocDetl.class, locFields), response); |
| | | } |
| | |
| | | @PreAuthorize("hasAuthority('asrs:mat:list')") |
| | | @PostMapping("/mat/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | List<Mat> list = matService.parseMat(matService.list()); |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<Mat, BaseParam> pageParam = new PageParam<>(baseParam, Mat.class); |
| | | List<Mat> data = matService.list(pageParam.buildWrapper(true)); |
| | | |
| | | List<Mat> list = matService.parseMat(data); |
| | | List<MatField> matFields = matFieldService.getMatFields(); |
| | | ExcelUtil.build(ExcelUtil.create(list, Mat.class, matFields), response); |
| | | } |
| | |
| | | @PostMapping("/order/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | String ioModel = map.getOrDefault("ioModel", "").toString(); |
| | | List<Order> list = orderService.list(); |
| | | map.remove("ioModel"); |
| | | |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<Order, BaseParam> pageParam = new PageParam<>(baseParam, Order.class); |
| | | QueryWrapper<Order> queryWrapper = pageParam.buildWrapper(true); |
| | | |
| | | List<Order> list = orderService.list(queryWrapper); |
| | | if (!Cools.isEmpty(ioModel)) { |
| | | LambdaQueryWrapper<Order> wrapper = new LambdaQueryWrapper<>(); |
| | | ArrayList<Long> types = new ArrayList<>(); |
| | | for (OrderType orderType : orderTypeService.list(new LambdaQueryWrapper<OrderType>().eq(OrderType::getType, ioModel.equals("in") ? 1 : 2))) { |
| | | types.add(orderType.getId()); |
| | | } |
| | | wrapper.in(Order::getOrderType, types); |
| | | list = orderService.list(wrapper); |
| | | queryWrapper.in("order_type", types); |
| | | list = orderService.list(queryWrapper); |
| | | } |
| | | ExcelUtil.build(ExcelUtil.create(list, Order.class), response); |
| | | } |
| | |
| | | @PreAuthorize("hasAuthority('asrs:orderDetl:list')") |
| | | @PostMapping("/orderDetl/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(orderDetlService.list(), OrderDetl.class), response); |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<OrderDetl, BaseParam> pageParam = new PageParam<>(baseParam, OrderDetl.class); |
| | | List<OrderDetl> data = orderDetlService.list(pageParam.buildWrapper(true)); |
| | | |
| | | ExcelUtil.build(ExcelUtil.create(data, OrderDetl.class), response); |
| | | } |
| | | |
| | | } |
| | |
| | | @PreAuthorize("hasAuthority('asrs:orderDetlLog:list')") |
| | | @PostMapping("/orderDetlLog/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(orderDetlLogService.list(), OrderDetlLog.class), response); |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<OrderDetlLog, BaseParam> pageParam = new PageParam<>(baseParam, OrderDetlLog.class); |
| | | List<OrderDetlLog> data = orderDetlLogService.list(pageParam.buildWrapper(true)); |
| | | |
| | | ExcelUtil.build(ExcelUtil.create(data, OrderDetlLog.class), response); |
| | | } |
| | | |
| | | } |
| | |
| | | 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.Order; |
| | | import com.zy.asrs.wms.asrs.entity.OrderType; |
| | | import com.zy.asrs.wms.asrs.service.OrderTypeService; |
| | | import com.zy.asrs.wms.common.annotation.CacheData; |
| | |
| | | @PreAuthorize("hasAuthority('asrs:orderLog:list')") |
| | | @PostMapping("/orderLog/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(orderLogService.list(), OrderLog.class), response); |
| | | String ioModel = map.getOrDefault("ioModel", "").toString(); |
| | | map.remove("ioModel"); |
| | | |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<OrderLog, BaseParam> pageParam = new PageParam<>(baseParam, OrderLog.class); |
| | | QueryWrapper<OrderLog> queryWrapper = pageParam.buildWrapper(true); |
| | | |
| | | List<OrderLog> list = orderLogService.list(queryWrapper); |
| | | if (!Cools.isEmpty(ioModel)) { |
| | | ArrayList<Long> types = new ArrayList<>(); |
| | | for (OrderType orderType : orderTypeService.list(new LambdaQueryWrapper<OrderType>().eq(OrderType::getType, ioModel.equals("in") ? 1 : 2))) { |
| | | types.add(orderType.getId()); |
| | | } |
| | | queryWrapper.in("order_type", types); |
| | | list = orderLogService.list(queryWrapper); |
| | | } |
| | | ExcelUtil.build(ExcelUtil.create(list, OrderLog.class), response); |
| | | } |
| | | |
| | | } |
| | |
| | | @PreAuthorize("hasAuthority('asrs:task:list')") |
| | | @PostMapping("/task/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(taskService.list(), Task.class), response); |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<Task, BaseParam> pageParam = new PageParam<>(baseParam, Task.class); |
| | | List<Task> data = taskService.list(pageParam.buildWrapper(true)); |
| | | |
| | | ExcelUtil.build(ExcelUtil.create(data, Task.class), response); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:task:update')") |
| | |
| | | @PreAuthorize("hasAuthority('asrs:taskDetl:list')") |
| | | @PostMapping("/taskDetl/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(taskDetlService.list(), TaskDetl.class), response); |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<TaskDetl, BaseParam> pageParam = new PageParam<>(baseParam, TaskDetl.class); |
| | | List<TaskDetl> data = taskDetlService.list(pageParam.buildWrapper(true)); |
| | | |
| | | ExcelUtil.build(ExcelUtil.create(data, TaskDetl.class), response); |
| | | } |
| | | |
| | | } |
| | |
| | | @PreAuthorize("hasAuthority('asrs:taskDetlLog:list')") |
| | | @PostMapping("/taskDetlLog/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(taskDetlLogService.list(), TaskDetlLog.class), response); |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<TaskDetlLog, BaseParam> pageParam = new PageParam<>(baseParam, TaskDetlLog.class); |
| | | List<TaskDetlLog> data = taskDetlLogService.list(pageParam.buildWrapper(true)); |
| | | |
| | | ExcelUtil.build(ExcelUtil.create(data, TaskDetlLog.class), response); |
| | | } |
| | | |
| | | } |
| | |
| | | @PreAuthorize("hasAuthority('asrs:taskLog:list')") |
| | | @PostMapping("/taskLog/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(taskLogService.list(), TaskLog.class), response); |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<TaskLog, BaseParam> pageParam = new PageParam<>(baseParam, TaskLog.class); |
| | | List<TaskLog> data = taskLogService.list(pageParam.buildWrapper(true)); |
| | | |
| | | ExcelUtil.build(ExcelUtil.create(data, TaskLog.class), response); |
| | | } |
| | | |
| | | } |
| | |
| | | @PreAuthorize("hasAuthority('asrs:waitPakin:list')") |
| | | @PostMapping("/waitPakin/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(waitPakinService.list(), WaitPakin.class), response); |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<WaitPakin, BaseParam> pageParam = new PageParam<>(baseParam, WaitPakin.class); |
| | | List<WaitPakin> data = waitPakinService.list(pageParam.buildWrapper(true)); |
| | | |
| | | ExcelUtil.build(ExcelUtil.create(data, WaitPakin.class), response); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:waitPakin:list')") |
| | |
| | | @PreAuthorize("hasAuthority('asrs:waitPakinLog:list')") |
| | | @PostMapping("/waitPakinLog/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(waitPakinLogService.list(), WaitPakinLog.class), response); |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<WaitPakinLog, BaseParam> pageParam = new PageParam<>(baseParam, WaitPakinLog.class); |
| | | List<WaitPakinLog> data = waitPakinLogService.list(pageParam.buildWrapper(true)); |
| | | |
| | | ExcelUtil.build(ExcelUtil.create(data, WaitPakinLog.class), response); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:viewInOut:list')") |
| | | @PostMapping("/viewInOut/export") |
| | | @CacheData(tableName = {"view_in_out", "man_task", "man_task_log"}) |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | QueryWrapper<ViewInOut> wrapper = new QueryWrapper<>(); |
| | | ExcelUtil.build(ExcelUtil.create(viewInOutMapper.selectList(wrapper), ViewInOut.class), response); |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<ViewInOut, BaseParam> pageParam = new PageParam<>(baseParam, ViewInOut.class); |
| | | QueryWrapper<ViewInOut> queryWrapper = pageParam.buildWrapper(true); |
| | | ExcelUtil.build(ExcelUtil.create(viewInOutMapper.selectList(queryWrapper), ViewInOut.class), response); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:viewStayTime:list')") |
| | | @PostMapping("/viewStayTime/export") |
| | | @CacheData(tableName = {"view_stay_time", "man_loc_detl", "man_loc"}) |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | QueryWrapper<ViewStayTime> wrapper = new QueryWrapper<>(); |
| | | ExcelUtil.build(ExcelUtil.create(viewStayTimeMapper.selectList(wrapper), ViewStayTime.class), response); |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<ViewStayTime, BaseParam> pageParam = new PageParam<>(baseParam, ViewStayTime.class); |
| | | QueryWrapper<ViewStayTime> queryWrapper = pageParam.buildWrapper(true, wrapper -> wrapper.orderByDesc("stay_time")); |
| | | ExcelUtil.build(ExcelUtil.create(viewStayTimeMapper.selectList(queryWrapper), ViewStayTime.class), response); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:viewWorkCountIn:list')") |
| | | @PostMapping("/viewWorkCountIn/export") |
| | | @CacheData(tableName = {"view_work_count_in", "man_task_log", "man_task_detl_log"}) |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | QueryWrapper<ViewWorkCountIn> wrapper = new QueryWrapper<>(); |
| | | ExcelUtil.build(ExcelUtil.create(viewWorkCountInMapper.selectList(wrapper), ViewWorkCountIn.class), response); |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<ViewWorkCountIn, BaseParam> pageParam = new PageParam<>(baseParam, ViewWorkCountIn.class); |
| | | QueryWrapper<ViewWorkCountIn> queryWrapper = pageParam.buildWrapper(true, wrapper -> wrapper.orderByDesc("oneday")); |
| | | ExcelUtil.build(ExcelUtil.create(viewWorkCountInMapper.selectList(queryWrapper), ViewWorkCountIn.class), response); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:viewWorkCountOut:list')") |
| | | @PostMapping("/viewWorkCountOut/export") |
| | | @CacheData(tableName = {"view_work_count_out", "man_task_log", "man_task_detl_log"}) |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | QueryWrapper<ViewWorkCountOut> wrapper = new QueryWrapper<>(); |
| | | ExcelUtil.build(ExcelUtil.create(viewWorkCountOutMapper.selectList(wrapper), ViewWorkCountOut.class), response); |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<ViewWorkCountOut, BaseParam> pageParam = new PageParam<>(baseParam, ViewWorkCountOut.class); |
| | | QueryWrapper<ViewWorkCountOut> queryWrapper = pageParam.buildWrapper(true, wrapper -> wrapper.orderByDesc("oneday")); |
| | | ExcelUtil.build(ExcelUtil.create(viewWorkCountOutMapper.selectList(queryWrapper), ViewWorkCountOut.class), response); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:viewWorkIn:list')") |
| | | @PostMapping("/viewWorkIn/export") |
| | | @CacheData(tableName = {"view_work_in", "man_task_log", "man_task_detl_log"}) |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | QueryWrapper<ViewWorkIn> wrapper = new QueryWrapper<>(); |
| | | ExcelUtil.build(ExcelUtil.create(viewWorkInMapper.selectList(wrapper), ViewWorkIn.class), response); |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<ViewWorkIn, BaseParam> pageParam = new PageParam<>(baseParam, ViewWorkIn.class); |
| | | QueryWrapper<ViewWorkIn> queryWrapper = pageParam.buildWrapper(true); |
| | | ExcelUtil.build(ExcelUtil.create(viewWorkInMapper.selectList(queryWrapper), ViewWorkIn.class), response); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | @PreAuthorize("hasAuthority('asrs:viewWorkOut:list')") |
| | | @PostMapping("/viewWorkOut/export") |
| | | @CacheData(tableName = {"view_work_out", "man_task_log", "man_task_detl_log"}) |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | QueryWrapper<ViewWorkOut> wrapper = new QueryWrapper<>(); |
| | | ExcelUtil.build(ExcelUtil.create(viewWorkOutMapper.selectList(wrapper), ViewWorkOut.class), response); |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<ViewWorkOut, BaseParam> pageParam = new PageParam<>(baseParam, ViewWorkOut.class); |
| | | QueryWrapper<ViewWorkOut> queryWrapper = pageParam.buildWrapper(true); |
| | | ExcelUtil.build(ExcelUtil.create(viewWorkOutMapper.selectList(queryWrapper), ViewWorkOut.class), response); |
| | | } |
| | | |
| | | } |
| | |
| | | @PreAuthorize("hasAuthority('system:language:list')") |
| | | @PostMapping("/language/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(languageService.list(), Language.class), response); |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<Language, BaseParam> pageParam = new PageParam<>(baseParam, Language.class); |
| | | List<Language> data = languageService.list(pageParam.buildWrapper(true)); |
| | | |
| | | ExcelUtil.build(ExcelUtil.create(data, Language.class), response); |
| | | } |
| | | |
| | | } |
| | |
| | | @PreAuthorize("hasAuthority('system:operationRecord:list')") |
| | | @PostMapping("/operationRecord/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(operationRecordService.list(), OperationRecord.class), response); |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<OperationRecord, BaseParam> pageParam = new PageParam<>(baseParam, OperationRecord.class); |
| | | List<OperationRecord> data = operationRecordService.list(pageParam.buildWrapper(true)); |
| | | |
| | | ExcelUtil.build(ExcelUtil.create(data, OperationRecord.class), response); |
| | | } |
| | | |
| | | } |
| | |
| | | @PreAuthorize("hasAuthority('system:userLogin:list')") |
| | | @PostMapping("/userLogin/export") |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(userLoginService.list(), UserLogin.class), response); |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<UserLogin, BaseParam> pageParam = new PageParam<>(baseParam, UserLogin.class); |
| | | List<UserLogin> data = userLoginService.list(pageParam.buildWrapper(true)); |
| | | |
| | | ExcelUtil.build(ExcelUtil.create(data, UserLogin.class), response); |
| | | } |
| | | |
| | | } |