From 65c13f7dafe0945ccd9b657cc31c4d4bc3a94359 Mon Sep 17 00:00:00 2001
From: yangyang
Date: 星期三, 02 七月 2025 19:38:39 +0800
Subject: [PATCH] 添加容器管理

---
 zy-asrs-admin/src/views/base/container/edit.vue                                       |  309 +++++++++++++++++
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/ContainerServiceImpl.java |   12 
 zy-asrs-wms/src/main/resources/mapper/asrs/ContainerMapper.xml                        |    5 
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/mapper/ContainerMapper.java            |   12 
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/entity/Container.java                  |  292 ++++++++++++++++
 zy-asrs-admin/src/views/base/container/index.vue                                      |  292 ++++++++++++++++
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/ContainerController.java    |  106 +++++
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/ContainerService.java          |    8 
 8 files changed, 1,036 insertions(+), 0 deletions(-)

diff --git a/zy-asrs-admin/src/views/base/container/edit.vue b/zy-asrs-admin/src/views/base/container/edit.vue
new file mode 100644
index 0000000..1220d0f
--- /dev/null
+++ b/zy-asrs-admin/src/views/base/container/edit.vue
@@ -0,0 +1,309 @@
+<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/container/save' : '/api/container/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 tenantQueryList = ref(null); 
+tenantQuery();
+function tenantQuery() { 
+    postForm('/api/tenant/query', {}).then(resp => { 
+        let result = resp.data;
+        tenantQueryList.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_container.name', '鍚嶇О') " 
+                      name="name" 
+                      style="width: 250px;" 
+                            >
+                    <a-input 
+                        v-model:value="formData.name" 
+                     /> 
+                        </a-form-item>
+                    <a-form-item 
+                      :label="formatMessage('db.man_container.code', '瀹瑰櫒缂栫爜') " 
+                      name="code" 
+                      style="width: 250px;" 
+                            :rules="[{ required: true }]"
+                            >
+                    <a-input 
+                        v-model:value="formData.code" 
+                     /> 
+                        </a-form-item>
+                    <a-form-item 
+                      :label="formatMessage('db.man_container.type', '瀹瑰櫒绫诲瀷') " 
+                      name="type" 
+                      style="width: 250px;" 
+                            :rules="[{ required: true }]"
+                            >
+                    <a-select 
+                        v-model:value="formData.type" 
+                        :options="[
+                                { label: ' 閽㈡墭鐩�', value: 1 },
+                                { label: ' 鏈ㄦ墭鐩�', value:  2 },
+                                { label: ' 濉戞枡鏂欐', value:  3 },
+                                { label: '鎵樼洏绗肩', value:  4 },
+                                { label: '閽㈡枡鏋�', value:  5 },
+                            ]"
+                        >
+                    </a-select>
+                        </a-form-item>
+                    <a-form-item 
+                      :label="formatMessage('db.man_container.used', '浣跨敤娆℃暟') " 
+                      name="used" 
+                      style="width: 250px;" 
+                            :rules="[{ required: true }]"
+                            >
+                    <a-input 
+                        v-model:value="formData.used" 
+                     /> 
+                        </a-form-item>
+                    <a-form-item 
+                      :label="formatMessage('db.man_container.length', '闀垮害') " 
+                      name="length" 
+                      style="width: 250px;" 
+                            >
+                    <a-input 
+                        v-model:value="formData.length" 
+                     /> 
+                        </a-form-item>
+                    <a-form-item 
+                      :label="formatMessage('db.man_container.width', '瀹藉害') " 
+                      name="width" 
+                      style="width: 250px;" 
+                            >
+                    <a-input 
+                        v-model:value="formData.width" 
+                     /> 
+                        </a-form-item>
+                    <a-form-item 
+                      :label="formatMessage('db.man_container.height', '楂樺害') " 
+                      name="height" 
+                      style="width: 250px;" 
+                            >
+                    <a-input 
+                        v-model:value="formData.height" 
+                     /> 
+                        </a-form-item>
+                    <a-form-item 
+                      :label="formatMessage('db.man_container.vaild_time', '鏈夋晥鏈�') " 
+                      name="vaildTime" 
+                      style="width: 250px;" 
+                            >
+                    <a-date-picker 
+                        v-model:value="formData.vaildTime" 
+                        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_container.flag_rycle', '鏄惁鍥炴敹') " 
+                      name="flagRycle" 
+                      style="width: 250px;" 
+                            :rules="[{ required: true }]"
+                            >
+                    <a-select 
+                        v-model:value="formData.flagRycle" 
+                        :options="[
+                                { label: '鏄�', value: 1 },
+                                { label: '鍚�', value:  0 },
+                            ]"
+                        >
+                    </a-select>
+                        </a-form-item>
+                    <a-form-item 
+                      :label="formatMessage('db.man_container.flag_logic', '鏄惁铏氭嫙') " 
+                      name="flagLogic" 
+                      style="width: 250px;" 
+                            :rules="[{ required: true }]"
+                            >
+                    <a-select 
+                        v-model:value="formData.flagLogic" 
+                        :options="[
+                                { label: '鏄�', value: 1 },
+                                { label: '鍚�', value:  0 },
+                            ]"
+                        >
+                    </a-select>
+                        </a-form-item>
+                    <a-form-item 
+                      :label="formatMessage('db.man_container.status', '鐘舵��') " 
+                      name="status" 
+                      style="width: 250px;" 
+                            :rules="[{ required: true }]"
+                            >
+                    <a-select 
+                        v-model:value="formData.status" 
+                        :options="[
+                                { label: '姝e父', value: 1 },
+                                { label: '鍐荤粨', value: 0 },
+                            ]"
+                        >
+                    </a-select>
+                        </a-form-item>
+                    <a-form-item 
+                      :label="formatMessage('db.man_container.tenant_id', '绉熸埛') " 
+                      name="tenantId" 
+                      style="width: 250px;" 
+                            >
+                    <a-select 
+                        v-model:value="formData.tenantId" 
+                        :placeholder="formatMessage('common.select', '璇烽�夋嫨')" 
+                        style="width: 100%" 
+                        show-search 
+                        :options="tenantQueryList" 
+                        optionFilterProp="label" 
+                        optionLabelProp="label" 
+                     > 
+                    </a-select>
+                        </a-form-item>
+                    <a-form-item 
+                      :label="formatMessage('db.man_container.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_container.create_time', '娣诲姞鏃堕棿') " 
+                      name="createTime" 
+                      style="width: 250px;" 
+                            :rules="[{ required: true }]"
+                            >
+                    <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_container.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_container.update_time', '淇敼鏃堕棿') " 
+                      name="updateTime" 
+                      style="width: 250px;" 
+                            :rules="[{ required: true }]"
+                            >
+                    <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_container.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>
diff --git a/zy-asrs-admin/src/views/base/container/index.vue b/zy-asrs-admin/src/views/base/container/index.vue
new file mode 100644
index 0000000..163cece
--- /dev/null
+++ b/zy-asrs-admin/src/views/base/container/index.vue
@@ -0,0 +1,292 @@
+<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-container';
+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_container.name', '鍚嶇О'),
+            dataIndex: 'name',
+            width: 140,
+            ellipsis: true,
+            ...getColumnSearchProps('name'),
+        },
+        {
+            title: formatMessage('db.man_container.code', '瀹瑰櫒缂栫爜'),
+            dataIndex: 'code',
+            width: 140,
+            ellipsis: true,
+            ...getColumnSearchProps('code'),
+        },
+        {
+            title: formatMessage('db.man_container.type', '瀹瑰櫒绫诲瀷'),
+            dataIndex: 'type$',
+            width: 140,
+            ellipsis: true,
+            ...getColumnSearchProps('type$'),
+        },
+        {
+            title: formatMessage('db.man_container.used', '浣跨敤娆℃暟'),
+            dataIndex: 'used',
+            width: 140,
+            ellipsis: true,
+            ...getColumnSearchProps('used'),
+        },
+        {
+            title: formatMessage('db.man_container.length', '闀垮害'),
+            dataIndex: 'length',
+            width: 140,
+            ellipsis: true,
+            ...getColumnSearchProps('length'),
+        },
+        {
+            title: formatMessage('db.man_container.width', '瀹藉害'),
+            dataIndex: 'width',
+            width: 140,
+            ellipsis: true,
+            ...getColumnSearchProps('width'),
+        },
+        {
+            title: formatMessage('db.man_container.height', '楂樺害'),
+            dataIndex: 'height',
+            width: 140,
+            ellipsis: true,
+            ...getColumnSearchProps('height'),
+        },
+        {
+            title: formatMessage('db.man_container.vaild_time', '鏈夋晥鏈�'),
+            dataIndex: 'vaildTime$',
+            width: 140,
+            ellipsis: true,
+            ...getColumnSearchProps('vaildTime$'),
+        },
+        {
+            title: formatMessage('db.man_container.flag_rycle', '鏄惁鍥炴敹'),
+            dataIndex: 'flagRycle$',
+            width: 140,
+            ellipsis: true,
+            ...getColumnSearchProps('flagRycle$'),
+        },
+        {
+            title: formatMessage('db.man_container.flag_logic', '鏄惁铏氭嫙'),
+            dataIndex: 'flagLogic$',
+            width: 140,
+            ellipsis: true,
+            ...getColumnSearchProps('flagLogic$'),
+        },
+        {
+            title: formatMessage('db.man_container.status', '鐘舵��'),
+            dataIndex: 'status$',
+            width: 140,
+            ellipsis: true,
+            ...getColumnSearchProps('status$'),
+        },
+        {
+            title: formatMessage('db.man_container.tenant_id', '绉熸埛'),
+            dataIndex: 'tenantId',
+            width: 140,
+            ellipsis: true,
+            ...getColumnSearchProps('tenantId'),
+        },
+        {
+            title: formatMessage('db.man_container.create_by', '娣诲姞浜哄憳'),
+            dataIndex: 'createBy$',
+            width: 140,
+            ellipsis: true,
+            ...getColumnSearchProps('createBy$'),
+        },
+        {
+            title: formatMessage('db.man_container.create_time', '娣诲姞鏃堕棿'),
+            dataIndex: 'createTime$',
+            width: 140,
+            ellipsis: true,
+            ...getColumnSearchProps('createTime$'),
+        },
+        {
+            title: formatMessage('db.man_container.update_by', '淇敼浜哄憳'),
+            dataIndex: 'updateBy$',
+            width: 140,
+            ellipsis: true,
+            ...getColumnSearchProps('updateBy$'),
+        },
+        {
+            title: formatMessage('db.man_container.update_time', '淇敼鏃堕棿'),
+            dataIndex: 'updateTime$',
+            width: 140,
+            ellipsis: true,
+            ...getColumnSearchProps('updateTime$'),
+        },
+        {
+            title: formatMessage('db.man_container.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/container/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/container/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/container/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 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>
diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/ContainerController.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/ContainerController.java
new file mode 100644
index 0000000..051e3a6
--- /dev/null
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/ContainerController.java
@@ -0,0 +1,106 @@
+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.Container;
+import com.zy.asrs.wms.asrs.service.ContainerService;
+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 ContainerController extends BaseController {
+
+    @Autowired
+    private ContainerService containerService;
+
+    @PreAuthorize("hasAuthority('asrs:container:list')")
+    @PostMapping("/container/page")
+    public R page(@RequestBody Map<String, Object> map) {
+        BaseParam baseParam = buildParam(map, BaseParam.class);
+        PageParam<Container, BaseParam> pageParam = new PageParam<>(baseParam, Container.class);
+        return R.ok().add(containerService.page(pageParam, pageParam.buildWrapper(true)));
+    }
+
+    @PreAuthorize("hasAuthority('asrs:container:list')")
+    @PostMapping("/container/list")
+    public R list(@RequestBody Map<String, Object> map) {
+        return R.ok().add(containerService.list());
+    }
+
+    @PreAuthorize("hasAuthority('asrs:container:list')")
+    @GetMapping("/container/{id}")
+    public R get(@PathVariable("id") Long id) {
+        return R.ok().add(containerService.getById(id));
+    }
+
+    @PreAuthorize("hasAuthority('asrs:container:save')")
+    @OperationLog("娣诲姞瀹瑰櫒绠$悊")
+    @PostMapping("/container/save")
+    public R save(@RequestBody Container container) {
+        if (!containerService.save(container)) {
+            return R.error("娣诲姞澶辫触");
+        }
+        return R.ok("娣诲姞鎴愬姛");
+    }
+
+    @PreAuthorize("hasAuthority('asrs:container:update')")
+    @OperationLog("淇敼瀹瑰櫒绠$悊")
+    @PostMapping("/container/update")
+    public R update(@RequestBody Container container) {
+        if (!containerService.updateById(container)) {
+            return R.error("淇敼澶辫触");
+        }
+        return R.ok("淇敼鎴愬姛");
+    }
+
+    @PreAuthorize("hasAuthority('asrs:container:remove')")
+    @OperationLog("鍒犻櫎瀹瑰櫒绠$悊")
+    @PostMapping("/container/remove/{ids}")
+    public R remove(@PathVariable Long[] ids) {
+        if (!containerService.removeByIds(Arrays.asList(ids))) {
+            return R.error("鍒犻櫎澶辫触");
+        }
+        return R.ok("鍒犻櫎鎴愬姛");
+    }
+
+    @PreAuthorize("hasAuthority('asrs:container:list')")
+    @PostMapping("/container/query")
+    public R query(@RequestParam(required = false) String condition) {
+        List<KeyValVo> vos = new ArrayList<>();
+        LambdaQueryWrapper<Container> wrapper = new LambdaQueryWrapper<>();
+        if (!Cools.isEmpty(condition)) {
+            wrapper.like(Container::getName, condition);
+        }
+        containerService.page(new Page<>(1, 30), wrapper).getRecords().forEach(
+                item -> vos.add(new KeyValVo(item.getId(), item.getName()))
+        );
+        return R.ok().add(vos);
+    }
+
+    @PreAuthorize("hasAuthority('asrs:container:list')")
+    @PostMapping("/container/export")
+    public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception {
+        BaseParam baseParam = buildParam(map, BaseParam.class);
+        PageParam<Container, BaseParam> pageParam = new PageParam<>(baseParam, Container.class);
+        List<Container> data = containerService.list(pageParam.buildWrapper(true));
+
+        ExcelUtil.build(ExcelUtil.create(data, Container.class), response);
+    }
+
+}
diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/entity/Container.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/entity/Container.java
new file mode 100644
index 0000000..3b281f2
--- /dev/null
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/entity/Container.java
@@ -0,0 +1,292 @@
+package com.zy.asrs.wms.asrs.entity;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import com.zy.asrs.wms.system.entity.User;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+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;
+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_container")
+public class Container 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 name;
+
+    /**
+     * 瀹瑰櫒缂栫爜
+     */
+    @ApiModelProperty(value= "瀹瑰櫒缂栫爜")
+    private String code;
+
+    /**
+     * 瀹瑰櫒绫诲瀷 1:  閽㈡墭鐩�   2:  鏈ㄦ墭鐩�   3:  濉戞枡鏂欐   4: 鎵樼洏绗肩   5: 閽㈡枡鏋�  
+     */
+    @ApiModelProperty(value= "瀹瑰櫒绫诲瀷 1:  閽㈡墭鐩�   2:  鏈ㄦ墭鐩�   3:  濉戞枡鏂欐   4: 鎵樼洏绗肩   5: 閽㈡枡鏋�  ")
+    private String type;
+
+    /**
+     * 浣跨敤娆℃暟
+     */
+    @ApiModelProperty(value= "浣跨敤娆℃暟")
+    private Integer used;
+
+    /**
+     * 闀垮害
+     */
+    @ApiModelProperty(value= "闀垮害")
+    private Double length;
+
+    /**
+     * 瀹藉害
+     */
+    @ApiModelProperty(value= "瀹藉害")
+    private Double width;
+
+    /**
+     * 楂樺害
+     */
+    @ApiModelProperty(value= "楂樺害")
+    private Double height;
+
+    /**
+     * 鏈夋晥鏈�
+     */
+    @ApiModelProperty(value= "鏈夋晥鏈�")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date vaildTime;
+
+    /**
+     * 鏄惁鍥炴敹 1: 鏄�   0: 鍚�  
+     */
+    @ApiModelProperty(value= "鏄惁鍥炴敹 1: 鏄�   0: 鍚�  ")
+    private Short flagRycle;
+
+    /**
+     * 鏄惁铏氭嫙 1: 鏄�   0: 鍚�  
+     */
+    @ApiModelProperty(value= "鏄惁铏氭嫙 1: 鏄�   0: 鍚�  ")
+    private Short flagLogic;
+
+    /**
+     * 鐘舵�� 1: 姝e父  0: 鍐荤粨  
+     */
+    @ApiModelProperty(value= "鐘舵�� 1: 姝e父  0: 鍐荤粨  ")
+    private Integer status;
+
+    /**
+     * 鏄惁鍒犻櫎 1: 鏄�  0: 鍚�  
+     */
+    @ApiModelProperty(value= "鏄惁鍒犻櫎 1: 鏄�  0: 鍚�  ")
+    @TableLogic
+    private Integer deleted;
+
+    /**
+     * 绉熸埛
+     */
+    @ApiModelProperty(value= "绉熸埛")
+    private Integer tenantId;
+
+    /**
+     * 娣诲姞浜哄憳
+     */
+    @ApiModelProperty(value= "娣诲姞浜哄憳")
+    private Long createBy;
+
+    /**
+     * 娣诲姞鏃堕棿
+     */
+    @ApiModelProperty(value= "娣诲姞鏃堕棿")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    /**
+     * 淇敼浜哄憳
+     */
+    @ApiModelProperty(value= "淇敼浜哄憳")
+    private Long updateBy;
+
+    /**
+     * 淇敼鏃堕棿
+     */
+    @ApiModelProperty(value= "淇敼鏃堕棿")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+    /**
+     * 澶囨敞
+     */
+    @ApiModelProperty(value= "澶囨敞")
+    private String memo;
+
+    public Container() {}
+
+    public Container(String name,String code,String type,Integer used,Double length,Double width,Double height,Date vaildTime,Short flagRycle,Short flagLogic,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) {
+        this.name = name;
+        this.code = code;
+        this.type = type;
+        this.used = used;
+        this.length = length;
+        this.width = width;
+        this.height = height;
+        this.vaildTime = vaildTime;
+        this.flagRycle = flagRycle;
+        this.flagLogic = flagLogic;
+        this.status = status;
+        this.deleted = deleted;
+        this.tenantId = tenantId;
+        this.createBy = createBy;
+        this.createTime = createTime;
+        this.updateBy = updateBy;
+        this.updateTime = updateTime;
+        this.memo = memo;
+    }
+
+//    Container container = new Container(
+//            null,    // 鍚嶇О
+//            null,    // 瀹瑰櫒缂栫爜[闈炵┖]
+//            null,    // 瀹瑰櫒绫诲瀷[闈炵┖]
+//            null,    // 浣跨敤娆℃暟[闈炵┖]
+//            null,    // 闀垮害
+//            null,    // 瀹藉害
+//            null,    // 楂樺害
+//            null,    // 鏈夋晥鏈�
+//            null,    // 鏄惁鍥炴敹[闈炵┖]
+//            null,    // 鏄惁铏氭嫙[闈炵┖]
+//            null,    // 鐘舵�乕闈炵┖]
+//            null,    // 鏄惁鍒犻櫎[闈炵┖]
+//            null,    // 绉熸埛
+//            null,    // 娣诲姞浜哄憳
+//            null,    // 娣诲姞鏃堕棿[闈炵┖]
+//            null,    // 淇敼浜哄憳
+//            null,    // 淇敼鏃堕棿[闈炵┖]
+//            null    // 澶囨敞
+//    );
+
+
+    public String getVaildTime$(){
+        if (Cools.isEmpty(this.vaildTime)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.vaildTime);
+    }
+
+    public String getFlagRycle$(){
+        if (null == this.flagRycle){ return null; }
+        switch (this.flagRycle){
+            case 1:
+                return "鏄�";
+            case  0:
+                return "鍚�";
+            default:
+                return String.valueOf(this.flagRycle);
+        }
+    }
+
+    public String getFlagLogic$(){
+        if (null == this.flagLogic){ return null; }
+        switch (this.flagLogic){
+            case 1:
+                return "鏄�";
+            case  0:
+                return "鍚�";
+            default:
+                return String.valueOf(this.flagLogic);
+        }
+    }
+
+    public String getStatus$(){
+        if (null == this.status){ return null; }
+        switch (this.status){
+            case 1:
+                return "姝e父";
+            case 0:
+                return "鍐荤粨";
+            default:
+                return String.valueOf(this.status);
+        }
+    }
+
+    public String getDeleted$(){
+        if (null == this.deleted){ return null; }
+        switch (this.deleted){
+            case 1:
+                return "鏄�";
+            case 0:
+                return "鍚�";
+            default:
+                return String.valueOf(this.deleted);
+        }
+    }
+
+    public String getCreateBy$(){
+        UserService service = SpringUtils.getBean(UserService.class);
+        User user = service.getById(this.createBy);
+        if (!Cools.isEmpty(user)){
+            return String.valueOf(user.getNickname());
+        }
+        return null;
+    }
+
+    public String getCreateTime$(){
+        if (Cools.isEmpty(this.createTime)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
+    }
+
+    public String getUpdateBy$(){
+        UserService service = SpringUtils.getBean(UserService.class);
+        User user = service.getById(this.updateBy);
+        if (!Cools.isEmpty(user)){
+            return String.valueOf(user.getNickname());
+        }
+        return null;
+    }
+
+    public String getUpdateTime$(){
+        if (Cools.isEmpty(this.updateTime)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
+    }
+
+
+
+    public void sync(Object source) {
+        Synchro.Copy(source, this);
+    }
+}
diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/mapper/ContainerMapper.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/mapper/ContainerMapper.java
new file mode 100644
index 0000000..530098e
--- /dev/null
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/mapper/ContainerMapper.java
@@ -0,0 +1,12 @@
+package com.zy.asrs.wms.asrs.mapper;
+
+import com.zy.asrs.wms.asrs.entity.Container;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+@Mapper
+@Repository
+public interface ContainerMapper extends BaseMapper<Container> {
+
+}
diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/ContainerService.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/ContainerService.java
new file mode 100644
index 0000000..de31fe7
--- /dev/null
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/ContainerService.java
@@ -0,0 +1,8 @@
+package com.zy.asrs.wms.asrs.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zy.asrs.wms.asrs.entity.Container;
+
+public interface ContainerService extends IService<Container> {
+
+}
diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/ContainerServiceImpl.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/ContainerServiceImpl.java
new file mode 100644
index 0000000..c77362a
--- /dev/null
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/ContainerServiceImpl.java
@@ -0,0 +1,12 @@
+package com.zy.asrs.wms.asrs.service.impl;
+
+import com.zy.asrs.wms.asrs.mapper.ContainerMapper;
+import com.zy.asrs.wms.asrs.entity.Container;
+import com.zy.asrs.wms.asrs.service.ContainerService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+@Service("containerService")
+public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container> implements ContainerService {
+
+}
diff --git a/zy-asrs-wms/src/main/resources/mapper/asrs/ContainerMapper.xml b/zy-asrs-wms/src/main/resources/mapper/asrs/ContainerMapper.xml
new file mode 100644
index 0000000..f2d9ecc
--- /dev/null
+++ b/zy-asrs-wms/src/main/resources/mapper/asrs/ContainerMapper.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.zy.asrs.wms.asrs.mapper.ContainerMapper">
+
+</mapper>

--
Gitblit v1.9.1