|  |  |  | 
|---|
|  |  |  | <script setup> | 
|---|
|  |  |  | import { getCurrentInstance, ref, computed, reactive, defineProps } from 'vue'; | 
|---|
|  |  |  | import {getCurrentInstance, ref, computed, reactive, defineProps, nextTick} from 'vue'; | 
|---|
|  |  |  | import { useRouter } from "vue-router"; | 
|---|
|  |  |  | import { get, post, postBlob, postForm } from '@/utils/request.js' | 
|---|
|  |  |  | import { message, Modal } from 'ant-design-vue'; | 
|---|
|  |  |  | 
|---|
|  |  |  | import { formatMessage } from '@/utils/localeUtils.js'; | 
|---|
|  |  |  | import useTableSearch from '@/utils/tableUtils.jsx'; | 
|---|
|  |  |  | import ShowOrderDetlComponent from '@/components/orderDetl/show.vue'; | 
|---|
|  |  |  | import OrderPrint from '@/components/print/orderPrint/index.vue' | 
|---|
|  |  |  | import { | 
|---|
|  |  |  | DownOutlined, | 
|---|
|  |  |  | UploadOutlined, | 
|---|
|  |  |  | 
|---|
|  |  |  | showOrderDetlChild.value.orderId = item.id; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const printChild = ref(null); | 
|---|
|  |  |  | // 打印订单 | 
|---|
|  |  |  | const handlePrint = async (record) => { | 
|---|
|  |  |  | let printData = []; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const resp = await get("/api/orderDetl/orderId/" + record.__v_raw.id, {}); | 
|---|
|  |  |  | let result = resp.data; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | result.data.forEach((item) => { | 
|---|
|  |  |  | let newItem = {}; | 
|---|
|  |  |  | newItem.matnr = item.mat$.matnr | 
|---|
|  |  |  | newItem.maktx = item.mat$.maktx | 
|---|
|  |  |  | newItem.specs = item.mat$.specs | 
|---|
|  |  |  | newItem.batch = item.batch | 
|---|
|  |  |  | newItem.anfme = item.anfme | 
|---|
|  |  |  | printData.push(newItem) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | printChild.value.printData = printData; | 
|---|
|  |  |  | printChild.value.orderNo = record.__v_raw.orderNo | 
|---|
|  |  |  | printChild.value.open = true; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const handleExport = async (intl) => { | 
|---|
|  |  |  | postBlob('/api/order/export', { | 
|---|
|  |  |  | ioModel: props.ioModel, | 
|---|
|  |  |  | 
|---|
|  |  |  | <div style="display: flex;justify-content: space-evenly;"> | 
|---|
|  |  |  | <a-button type="link" primary @click="showDetl(record)">{{ formatMessage('page.order.orderDetl', '订单明细') | 
|---|
|  |  |  | }}</a-button> | 
|---|
|  |  |  | <a-button type="link" primary @click="handlePrint(record)">{{ formatMessage('page.order.orderDetl', | 
|---|
|  |  |  | '打印订单') | 
|---|
|  |  |  | }}</a-button> | 
|---|
|  |  |  | <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> | 
|---|
|  |  |  | 
|---|
|  |  |  | <ShowOrderDetlComponent ref="showOrderDetlChild" /> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <OrderPrint ref="printChild" /> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <style></style> | 
|---|
|  |  |  | 
|---|
|  |  |  | <script setup> | 
|---|
|  |  |  | import { getCurrentInstance, ref, computed, reactive, defineProps } from 'vue'; | 
|---|
|  |  |  | import {getCurrentInstance, ref, computed, reactive, defineProps, nextTick} from 'vue'; | 
|---|
|  |  |  | import { useRouter } from "vue-router"; | 
|---|
|  |  |  | import { get, post, postBlob, postForm } from '@/utils/request.js' | 
|---|
|  |  |  | import { message, Modal } from 'ant-design-vue'; | 
|---|
|  |  |  | 
|---|
|  |  |  | import { formatMessage } from '@/utils/localeUtils.js'; | 
|---|
|  |  |  | import useTableSearch from '@/utils/tableUtils.jsx'; | 
|---|
|  |  |  | import ShowOrderDetlComponent from '@/components/orderDetl/show.vue'; | 
|---|
|  |  |  | import OrderPrint from '@/components/print/orderPrint/index.vue' | 
|---|
|  |  |  | import { | 
|---|
|  |  |  | DownOutlined, | 
|---|
|  |  |  | UploadOutlined, | 
|---|
|  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const printChild = ref(null); | 
|---|
|  |  |  | // 打印订单 | 
|---|
|  |  |  | const handlePrint = async (record) => { | 
|---|
|  |  |  | let printData = []; | 
|---|
|  |  |  | const resp = await get("/api/orderDetl/orderId/" + record.__v_raw.id, {}); | 
|---|
|  |  |  | const result = resp.data; | 
|---|
|  |  |  | result.data.forEach((item) => { | 
|---|
|  |  |  | let newItem = {}; | 
|---|
|  |  |  | newItem.matnr = item.mat$.matnr | 
|---|
|  |  |  | newItem.maktx = item.mat$.maktx | 
|---|
|  |  |  | newItem.specs = item.mat$.specs | 
|---|
|  |  |  | newItem.batch = item.batch | 
|---|
|  |  |  | newItem.anfme = item.anfme | 
|---|
|  |  |  | printData.push(newItem) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | printChild.value.printData = printData; | 
|---|
|  |  |  | printChild.value.orderNo = record.__v_raw.orderNo | 
|---|
|  |  |  | printChild.value.open = true; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const onSearch = () => { | 
|---|
|  |  |  | // console.log('search'); | 
|---|
|  |  |  | getPage() | 
|---|
|  |  |  | 
|---|
|  |  |  | <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="showDetl(record)">{{ formatMessage('page.order.orderDetl', | 
|---|
|  |  |  | '订单明细') | 
|---|
|  |  |  | }}</a-button> | 
|---|
|  |  |  | <a-button type="link" primary @click="showDetl(record)">{{ formatMessage('page.order.orderDetl', | 
|---|
|  |  |  | '订单明细') | 
|---|
|  |  |  | }}</a-button> | 
|---|
|  |  |  | <a-button type="link" primary @click="handlePrint(record)">{{ formatMessage('page.order.orderDetl', | 
|---|
|  |  |  | '打印订单') | 
|---|
|  |  |  | }}</a-button> | 
|---|
|  |  |  | <a-button type="link" primary @click="handleEdit(record)">{{ formatMessage('page.edit', '编辑') | 
|---|
|  |  |  | }}</a-button> | 
|---|
|  |  |  | <a-button type="link" danger @click="handleDel([record])">{{ formatMessage('page.delete', '删除') | 
|---|
|  |  |  | 
|---|
|  |  |  | <ShowOrderDetlComponent ref="showOrderDetlChild" /> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <OrderPrint ref="printChild" /> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <style></style> | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | <script setup> | 
|---|
|  |  |  | import {ref, toRaw} from 'vue'; | 
|---|
|  |  |  | import { formatMessage } from '@/utils/localeUtils'; | 
|---|
|  |  |  | import Template1 from './template/template1.vue'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const template = { | 
|---|
|  |  |  | Template1 | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const printChild = ref(null); | 
|---|
|  |  |  | const selectTemplate = ref('Template1'); | 
|---|
|  |  |  | let open = ref(false); | 
|---|
|  |  |  | let printData = ref([]); | 
|---|
|  |  |  | let repeatNum = ref(1); | 
|---|
|  |  |  | let orderNo = ref(''); | 
|---|
|  |  |  | const handleOk = () => { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const printObj = ref({ | 
|---|
|  |  |  | id: "printOrder", | 
|---|
|  |  |  | beforeOpenCallback(vue) { | 
|---|
|  |  |  | // console.log(toRaw(printData.value)) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | openCallback(vue) { | 
|---|
|  |  |  | console.log('执行了打印') | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | closeCallback(vue) { | 
|---|
|  |  |  | console.log('关闭了打印工具') | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | defineExpose({ | 
|---|
|  |  |  | open, | 
|---|
|  |  |  | orderNo, | 
|---|
|  |  |  | printData | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <a-modal v-model:open="open" :title="formatMessage('', '订单打印')" @ok="handleOk" :width="'60%'" v-if="open"> | 
|---|
|  |  |  | <div style="height: 500px;overflow-x: hidden;overflow-y: scroll;"> | 
|---|
|  |  |  | <div style="margin-top: 20px;"> | 
|---|
|  |  |  | <Component :is="template[selectTemplate]" ref="printChild" :list="printData" :repeatNum="repeatNum" :orderNo="orderNo" /> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <template #footer> | 
|---|
|  |  |  | <a-button key="submit" type="primary" v-print="printObj" @click="handleOk"> | 
|---|
|  |  |  | {{ formatMessage('common.print', '打印') }} | 
|---|
|  |  |  | </a-button> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </a-modal> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <style></style> | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | <script setup> | 
|---|
|  |  |  | import {toRefs, ref, defineProps, watch} from 'vue'; | 
|---|
|  |  |  | import { globalState } from '@/config.js' | 
|---|
|  |  |  | import { formatMessage } from '@/utils/localeUtils'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const props = defineProps({ | 
|---|
|  |  |  | orderNo: { | 
|---|
|  |  |  | type: String, | 
|---|
|  |  |  | default: '' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | list: { | 
|---|
|  |  |  | type: Array, | 
|---|
|  |  |  | default: [] | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | repeatNum: { | 
|---|
|  |  |  | type: Number, | 
|---|
|  |  |  | default: 1 | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | const { orderNo,list, repeatNum } = toRefs(props) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <div id="printOrder"> | 
|---|
|  |  |  | <div> | 
|---|
|  |  |  | <table class="contain" width="1200" | 
|---|
|  |  |  | style="overflow: hidden;font-size: xx-small;table-layout: fixed;"> | 
|---|
|  |  |  | <tr style="height: 100px"> | 
|---|
|  |  |  | <td colspan="1" align="center" scope="col">订单号</td> | 
|---|
|  |  |  | <td colspan="2" align="center" scope="col">{{orderNo}}</td> | 
|---|
|  |  |  | <td class="barcode" colspan="9" align="center" scope="col"> | 
|---|
|  |  |  | <img :src="globalState.url + '/api/code/auth?type=1¶m=' + orderNo" width="70%;" /> | 
|---|
|  |  |  | <div style="letter-spacing: 2px;margin-top: 1px; text-align: center;"> | 
|---|
|  |  |  | <span>{{ orderNo }} </span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </td> | 
|---|
|  |  |  | </tr> | 
|---|
|  |  |  | <tr style="height: 40px"> | 
|---|
|  |  |  | <td align="center" colspan="1">序号</td> | 
|---|
|  |  |  | <td align="center" colspan="2">商品编号</td> | 
|---|
|  |  |  | <td align="center" colspan="3">商品名称</td> | 
|---|
|  |  |  | <td align="center" colspan="2">批次</td> | 
|---|
|  |  |  | <td align="center" colspan="2">规格</td> | 
|---|
|  |  |  | <td align="center" colspan="1">数量 </td> | 
|---|
|  |  |  | </tr> | 
|---|
|  |  |  | <template v-for="(item, index) in list" :key="index"> | 
|---|
|  |  |  | <tr style="height: 40px"> | 
|---|
|  |  |  | <td align="center" colspan="1">{{index + 1}}</td> | 
|---|
|  |  |  | <td align="center" colspan="2">{{ item.matnr }}</td> | 
|---|
|  |  |  | <td align="center" colspan="3">{{ item.maktx }}</td> | 
|---|
|  |  |  | <td align="center" colspan="2">{{ item.batch }}</td> | 
|---|
|  |  |  | <td align="center" colspan="2">{{ item.specs }}</td> | 
|---|
|  |  |  | <td align="center" colspan="1">{{ item.anfme }}</td> | 
|---|
|  |  |  | </tr> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </table> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <style> | 
|---|
|  |  |  | @media print { | 
|---|
|  |  |  | body { | 
|---|
|  |  |  | margin: 0; | 
|---|
|  |  |  | padding: 0; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .print-area { | 
|---|
|  |  |  | margin: 0; | 
|---|
|  |  |  | padding: 0; | 
|---|
|  |  |  | height: auto; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .contain td { | 
|---|
|  |  |  | border: 1px solid #000; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </style> | 
|---|
|  |  |  | 
|---|
|  |  |  | import { reactive, inject } from 'vue'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | export const globalState = reactive({ | 
|---|
|  |  |  | url: 'http://127.0.0.1:8081/wms', | 
|---|
|  |  |  | url: 'http://192.168.8.14:8081/wms', | 
|---|
|  |  |  | token: '', | 
|---|
|  |  |  | user: null, | 
|---|
|  |  |  | locale: 'zh_CN', // 默认语言 | 
|---|
|  |  |  | 
|---|
|  |  |  | let currentPage = 1; | 
|---|
|  |  |  | let pageSize = 10; | 
|---|
|  |  |  | const searchInput = ref("") | 
|---|
|  |  |  | const searchParam = ref({ | 
|---|
|  |  |  | createTime: null, | 
|---|
|  |  |  | targetLoc: null, | 
|---|
|  |  |  | matnr: null, | 
|---|
|  |  |  | maktx: null, | 
|---|
|  |  |  | batch: null, | 
|---|
|  |  |  | barcode: null, | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | const editChild = ref(null) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const state = reactive({ | 
|---|
|  |  |  | 
|---|
|  |  |  | post('/api/viewWorkIn/page', { | 
|---|
|  |  |  | current: currentPage, | 
|---|
|  |  |  | pageSize: pageSize, | 
|---|
|  |  |  | condition: searchInput.value | 
|---|
|  |  |  | condition: searchInput.value, | 
|---|
|  |  |  | _param: searchParam.value, | 
|---|
|  |  |  | }).then((resp) => { | 
|---|
|  |  |  | let result = resp.data; | 
|---|
|  |  |  | if (result.code == 200) { | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const handleExport = async (intl) => { | 
|---|
|  |  |  | postBlob('/api/viewWorkIn/export', { | 
|---|
|  |  |  | condition: searchInput.value | 
|---|
|  |  |  | 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); | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <div> | 
|---|
|  |  |  | <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="handleExport">{{ formatMessage('page.export', '导出') }}</a-button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="table-header"> | 
|---|
|  |  |  | <div> | 
|---|
|  |  |  | <a-input v-model:value="searchParam.createTime" :placeholder="formatMessage('page.locDetl.createTime.input', '入库日期')" | 
|---|
|  |  |  | style="width: 140px;margin-right: 10px;"/> | 
|---|
|  |  |  | <a-input v-model:value="searchParam.targetLoc" :placeholder="formatMessage('page.locDetl.targetLoc.input', '库位号')" | 
|---|
|  |  |  | style="width: 140px;margin-right: 10px;"/> | 
|---|
|  |  |  | <a-input v-model:value="searchParam.matnr" :placeholder="formatMessage('page.locDetl.matnr.input', '商品编号')" | 
|---|
|  |  |  | style="width: 140px;margin-right: 10px;"/> | 
|---|
|  |  |  | <a-input v-model:value="searchParam.maktx" :placeholder="formatMessage('page.locDetl.maktx.input', '商品名称')" | 
|---|
|  |  |  | style="width: 140px;margin-right: 10px;"/> | 
|---|
|  |  |  | <a-input v-model:value="searchParam.batch" :placeholder="formatMessage('page.locDetl.batch.input', '批次')" | 
|---|
|  |  |  | style="width: 140px;margin-right: 10px;"/> | 
|---|
|  |  |  | <a-input v-model:value="searchParam.barcode" :placeholder="formatMessage('page.locDetl.barcode.input', '条码')" | 
|---|
|  |  |  | style="width: 140px;margin-right: 10px;"/> | 
|---|
|  |  |  | <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '请输入')" | 
|---|
|  |  |  | style="width: 200px;" @search="onSearch"/> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="table-header-right"> | 
|---|
|  |  |  | <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 }" | 
|---|
|  |  |  | 
|---|
|  |  |  | @TableName("view_work_in") | 
|---|
|  |  |  | public class ViewWorkIn extends TaskDetlLog { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private String maktx; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private String targetLoc; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | package com.zy.asrs.wms.asrs.manage; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson.JSON; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.conditions.Wrapper; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
|---|
|  |  |  | import com.fasterxml.jackson.datatype.jsr310.DecimalUtils; | 
|---|
|  |  |  | import com.mysql.cj.util.StringUtils; | 
|---|
|  |  |  | import com.zy.asrs.framework.exception.CoolException; | 
|---|
|  |  |  | import com.zy.asrs.wms.asrs.entity.*; | 
|---|
|  |  |  | 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.*; | 
|---|
|  |  |  | import com.zy.asrs.wms.asrs.entity.param.*; | 
|---|
|  |  |  | import com.zy.asrs.wms.asrs.entity.*; | 
|---|
|  |  |  | import com.zy.asrs.wms.asrs.service.*; | 
|---|
|  |  |  | import com.zy.asrs.wms.utils.OrderUtils; | 
|---|
|  |  |  | import com.zy.asrs.wms.utils.OutUtils; | 
|---|
|  |  |  | 
|---|
|  |  |  | import org.springframework.transaction.annotation.Transactional; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.math.BigDecimal; | 
|---|
|  |  |  | import java.text.DecimalFormat; | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.*; | 
|---|
|  |  |  | import java.util.stream.Collectors; | 
|---|
|  |  |  | import java.util.stream.Stream; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 出库管理 | 
|---|
|  |  |  | 
|---|
|  |  |  | if (!flatOrders.isEmpty()) { | 
|---|
|  |  |  | //平库出库 | 
|---|
|  |  |  | outStockByFlat(flatOrders, wave); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (!tucOrders.isEmpty()) { | 
|---|
|  |  |  | } else if (!tucOrders.isEmpty()) { | 
|---|
|  |  |  | //CTU出库 | 
|---|
|  |  |  | outStockByTUC(tucOrders, wave); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | throw new CoolException("库存不足"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | CacheSite cacheSite = cacheSiteService.getOne(new LambdaQueryWrapper<CacheSite>().eq(CacheSite::getOrderId, order.getId())); | 
|---|
|  |  |  | if (cacheSite == null) { | 
|---|
|  |  |  | throw new CoolException("缓存站不存在"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | cacheSite.setSiteStatus(CacheSiteStatusType.O.id); | 
|---|
|  |  |  | cacheSite.setOrderId(null); | 
|---|
|  |  |  | cacheSite.setOrderNo(null); | 
|---|
|  |  |  | cacheSite.setUpdateTime(new Date()); | 
|---|
|  |  |  | if (!cacheSiteService.updateById(cacheSite)) { | 
|---|
|  |  |  | throw new CoolException("缓存站清空失败"); | 
|---|
|  |  |  | if (cacheSite != null) { | 
|---|
|  |  |  | cacheSite.setSiteStatus(CacheSiteStatusType.O.id); | 
|---|
|  |  |  | cacheSite.setOrderId(null); | 
|---|
|  |  |  | cacheSite.setOrderNo(null); | 
|---|
|  |  |  | cacheSite.setUpdateTime(new Date()); | 
|---|
|  |  |  | if (!cacheSiteService.updateById(cacheSite)) { | 
|---|
|  |  |  | throw new CoolException("缓存站清空失败"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|