From 836b91c811d90ee79d37bb10edb9a759188b21d4 Mon Sep 17 00:00:00 2001
From: youjie <272855983@qq.com>
Date: Wed, 30 Nov 2022 08:39:21 +0800
Subject: [PATCH] 1.优化出库、入库 2.开发选择出库口功能

---
 jeecg-boot-master/ant-design-vue-jeecg/src/api/api.js                                                                                                                     |  22 ++++++++++++++++++++++
 jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/ContainerList.vue                                                                                          |  14 ++------------
 jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerDetailList.vue                                                                            |  45 +++++++++++++++++++++++++++++++++++++++------
 jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue                                                                            |  10 +++++++++-
 jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/ReceiptHeaderList.vue                                                                                     |   2 +-
 jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptContainerSelectModal.vue                                                                   | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiveModal.vue                                                                                  |   3 ---
 jeecg-boot-master/ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerDetailList.vue                                                                          |  90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 jeecg-boot-master/ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerHeaderList.vue                                                                          |  25 +++++++++----------------
 jeecg-boot-master/ant-design-vue-jeecg/src/views/system/shipment/modules/ShipmentContainerSelectModal.vue                                                                 | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 jeecg-boot-master/ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue                                                                                    |  38 ++++++++++++++------------------------
 jeecg-boot-master/ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue                                                                                   |  23 ++++-------------------
 jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/port/controller/PortController.java                                      |   1 +
 jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/port/service/IPortService.java                                           |   4 ++++
 jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/port/service/impl/PortServiceImpl.java                                   |  15 +++++++++++++++
 jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/controller/ReceiptContainerHeaderController.java |  51 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/impl/ReceiveServiceImpl.java                          |   3 +++
 jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/controller/shipmentCombinationController.java      |  51 +++++++++++++++++++++++++++++++++++++++++++++++++--
 jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java   |   1 -
 jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentContainerHeader/entity/ShipmentContainerDetail.java            |   1 +
 jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java                         |   7 ++++++-
 jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/utils/constant/QuantityConstant.java                                                        |   4 ++++
 22 files changed, 580 insertions(+), 91 deletions(-)
 create mode 100644 jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptContainerSelectModal.vue
 create mode 100644 jeecg-boot-master/ant-design-vue-jeecg/src/views/system/shipment/modules/ShipmentContainerSelectModal.vue

diff --git a/jeecg-boot-master/ant-design-vue-jeecg/src/api/api.js b/jeecg-boot-master/ant-design-vue-jeecg/src/api/api.js
index c3f09c4..6a5894e 100644
--- a/jeecg-boot-master/ant-design-vue-jeecg/src/api/api.js
+++ b/jeecg-boot-master/ant-design-vue-jeecg/src/api/api.js
@@ -93,24 +93,46 @@ const checkRuleByCode = (params) => getAction('/sys/checkRule/checkByCode', para
 const getUserNoticeInfo= (params)=>getAction("/sys/sysAnnouncementSend/getMyAnnouncementSend",params);
 const getTransitURL = url => `/sys/common/transitRESTful?url=${encodeURIComponent(url)}`
 
+//根据用户编码,获取仓库信息
 export const getWarehouseByUserCode = (params)=>postAction('/sys/getWarehouseByUserCode', params);
+//获取库区列表
 export const getZoneList = (params)=>getAction('/config/zone/getZoneList', params);
+//获取容器类型列表
 export const getContainerTypeList = (params)=>getAction('/config/containerType/getContainerTypeList', params);
+//获取库位类型列表
 export const getLocationTypeList = (params)=>getAction('/config/locationType/getLocationTypeList', params);
+//获取库位类高度列表
 export const getLocationHighList = (params)=>postAction('/config/locationHigh/getLocationHighList', params);
+//获取货主列表
 export const getCompanyList = (params)=>getAction('/config/company/getCompanyList', params);
+//获取承运商列表
 export const getCarrierList = (params)=>getAction('/config/carrier/getCarrierList', params);
+//获取客户列表
 export const getCustomerList = (params)=>getAction('/config/customer/getCustomerList', params);
+//获取供应商列表
 export const getSupplierList = (params)=>getAction('/config/supplier/getSupplierList', params);
+//获取入库类型列表
 export const getReceiptTypeList = (params)=>getAction('/config/receiptType/getReceiptTypeList', params);
+//获取出库类型列表
 export const getShipmentTypeList = (params)=>getAction('/config/shipmentType/getShipmentTypeList', params);
+//根据物料编码查询物料信息
 export const searchMaterialByCode = (params)=>postAction('/config/material/searchMaterialByCode', params);
+//根据入库单头ID查询入库单详情
 export const listReceiveByReceiptId = (params)=>postAction('/receipt/receiveHeader/listReceiveByReceiptId', params);
+//创建入库任务
 export const createReceiptTask = (params)=>postAction('/receipt/receiptContainerHeader/createReceiptTask', params);
+//完成WMS任务
 export const completeTaskByWMS = (params)=>postAction('/task/taskHeader/completeTaskByWMS', params);
+//下发任务给WCS
 export const execute = (params)=>postAction('/task/taskHeader/execute', params);
+//自动配盘
 export const autoCombination = (params)=>postAction('/shipment/shipmentCombination/autoCombination', params);
+//创建出库任务
 export const createShipmentTask = (params)=>postAction('/shipment/shipmentCombination/createShipmentTask', params);
+//选择出库分拣口
+export const selectSortingPort = (params)=>postAction('/shipment/shipmentCombination/selectSortingPort', params);
+//选择入库分拣口
+export const selectSupplePort = (params)=>postAction('/receipt/receiptContainerHeader/selectSupplePort', params);
 
 // 中转HTTP请求
 export const transitRESTful = {
diff --git a/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/ContainerList.vue b/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/ContainerList.vue
index 1006b16..e4ad7ba 100644
--- a/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/ContainerList.vue
+++ b/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/ContainerList.vue
@@ -10,17 +10,12 @@
             </a-form-item>
           </a-col>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
-            <a-form-item label="货主">
-              <a-input placeholder="请输入货主" v-model="queryParam.companyCode"></a-input>
+            <a-form-item label="库位编码">
+              <a-input placeholder="请输入库位编码" v-model="queryParam.locationCode"></a-input>
             </a-form-item>
           </a-col>
           <template v-if="toggleSearchStatus">
             <a-col :xl="6" :lg="7" :md="8" :sm="24">
-              <a-form-item label="库位编码">
-                <a-input placeholder="请输入库位编码" v-model="queryParam.locationCode"></a-input>
-              </a-form-item>
-            </a-col>
-            <a-col :xl="6" :lg="7" :md="8" :sm="24">
               <a-form-item label="容器类型">
                 <a-select
                   show-search
@@ -188,11 +183,6 @@
             dataIndex: 'code'
           },
           {
-            title:'货主',
-            align:"center",
-            dataIndex: 'companyCode'
-          },
-          {
             title:'库位编码',
             align:"center",
             dataIndex: 'locationCode'
diff --git a/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerDetailList.vue b/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerDetailList.vue
index 0c3b018..eec660a 100644
--- a/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerDetailList.vue
+++ b/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerDetailList.vue
@@ -6,8 +6,15 @@
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-row :gutter="24">
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
-            <a-form-item label="货主编码">
-              <a-input placeholder="请输入货主编码" v-model="queryParam.companyCode"></a-input>
+            <a-form-item label="货主">
+              <a-select
+                show-search
+                placeholder="请选择货主"
+                option-filter-prop="children"
+                :filter-option="filterOption"
+                v-model="queryParam.companyCode">
+                <a-select-option v-for="item in companyList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option>
+              </a-select>
             </a-form-item>
           </a-col>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -88,6 +95,11 @@
         :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
         @change="handleTableChange">
 
+        <span slot="companyCode" slot-scope="companyCode">
+          <a-tag :key="companyCode" color=blue>
+            {{ solutionCompany(companyCode) }}
+          </a-tag>
+        </span>
         <template slot="htmlSlot" slot-scope="text">
           <div v-html="text"></div>
         </template>
@@ -127,6 +139,7 @@
 
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
   import ReceiptContainerDetailModal from './modules/ReceiptContainerDetailModal'
+  import {getCompanyList} from '@/api/api'
 
   export default {
     name: "ReceiptContainerDetailList",
@@ -156,6 +169,7 @@
       return {
         description: '入库组盘管理页面',
         disableMixinCreated:true,
+        companyList:[],
         // 表头
         columns: [
           {
@@ -164,9 +178,11 @@
             dataIndex: 'id'
           },
           {
-            title:'货主编码',
+            title:'货主',
             align:"center",
-            dataIndex: 'companyCode'
+            dataIndex: 'companyCode',
+            key: 'companyCode',
+            scopedSlots: { customRender: 'companyCode' }
           },
           {
             title:'物料编码',
@@ -246,6 +262,7 @@
       }
     },
     created() {
+      this.loadFrom();
     },
     computed: {
       importExcelUrl(){
@@ -257,8 +274,24 @@
         this.dataSource=[]
         this.selectedRowKeys=[]
         this.ipagination.current = 1
-      }
-
+      },
+      loadFrom() {
+        getCompanyList().then((res) => {
+          if (res.success) {
+            this.companyList = res.result
+          }
+        });
+      },
+      solutionCompany(value) {
+        var actions = []
+        Object.keys(this.companyList).some((key) => {
+          if (this.companyList[key].code == ('' + value)) {
+            actions.push(this.companyList[key].name)
+            return true
+          }
+        })
+        return actions.join('')
+      },
     }
   }
 </script>
diff --git a/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue b/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue
index 5ed02e3..291aaf1 100644
--- a/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue
+++ b/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue
@@ -114,7 +114,7 @@
         <span slot="action" slot-scope="text, record">
           <a @click="handleEdit(record)">编辑</a>
           <a-divider type="vertical" />
-          <a v-if="record.status == 0" @click="createTask(record)">生成任务</a>
+          <a v-if="record.status == 0 && record.taskType == 200" @click="selectPort(record)">生成任务</a>
           <a-divider type="vertical" />
           <a-dropdown>
             <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
@@ -138,6 +138,7 @@
     </a-tabs>
 
     <receiptContainerHeader-modal ref="modalForm" @ok="modalFormOk"></receiptContainerHeader-modal>
+    <receiptContainerSelect-modal ref="modalForm2" @ok="modalFormOk"></receiptContainerSelect-modal>
   </a-card>
 </template>
 
@@ -150,11 +151,13 @@
   import {initDictOptions,filterMultiDictText} from '@/components/dict/JDictSelectUtil'
   import '@/assets/less/TableExpand.less'
   import {createReceiptTask} from '@/api/api'
+  import ReceiptContainerSelectModal from "./modules/ReceiptContainerSelectModal";
 
   export default {
     name: "ReceiptContainerHeaderList",
     mixins:[JeecgListMixin],
     components: {
+      ReceiptContainerSelectModal,
       ReceiptContainerDetailList,
       ReceiptContainerHeaderModal
     },
@@ -301,6 +304,11 @@
           this.searchQuery();
         });
       },
+      selectPort(record) {
+        this.$refs.modalForm2.edit(record);
+        this.$refs.modalForm2.title = "选择分拣入库口";
+        console.log("selectPort");
+      },
       loadData(arg) {
         if(!this.url.list){
           this.$message.error("请设置url.list属性!")
diff --git a/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/ReceiptHeaderList.vue b/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/ReceiptHeaderList.vue
index 229fb2e..517710f 100644
--- a/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/ReceiptHeaderList.vue
+++ b/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/ReceiptHeaderList.vue
@@ -122,7 +122,7 @@
         :customRow="clickThenSelect"
         @change="handleTableChange">
 
-         <span slot="companyCode" slot-scope="companyCode">
+        <span slot="companyCode" slot-scope="companyCode">
           <a-tag :key="companyCode" color=blue>
             {{ solutionCompany(companyCode) }}
           </a-tag>
diff --git a/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptContainerSelectModal.vue b/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptContainerSelectModal.vue
new file mode 100644
index 0000000..17bdfc3
--- /dev/null
+++ b/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptContainerSelectModal.vue
@@ -0,0 +1,130 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    switchFullscreen
+    @ok="handleOk"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <a-spin :spinning="confirmLoading">
+      <a-form-model ref="form" :model="model" :rules="validatorRules">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="分拣入库口"  :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toPort">
+              <a-select
+                show-search
+                placeholder="请选择分拣入库口"
+                option-filter-prop="children"
+                :filter-option="filterOption"
+                v-model="model.toPort">
+                <a-select-option v-for="item in portList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </a-spin>
+  </j-modal>
+</template>
+
+<script>
+
+  import { httpAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+  import {createShipmentTask} from '@/api/api'
+  import {selectSupplePort} from '@/api/api'
+
+  export default {
+    name: "ReceiptContainerSelectModal",
+    portList:[],
+    components: {
+    },
+    props:{
+      mainId:{
+        type:String,
+        required:false,
+        default:''
+      }
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        model:{
+        },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+
+        confirmLoading: false,
+        validatorRules: {
+        },
+        url: {
+          createTask: "/shipment/shipmentContainerHeader/createShipmentTask",
+        }
+
+      }
+    },
+    created () {
+    //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        console.log("edit");
+        this.getPortList(record);
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+        this.$refs.form.clearValidate();
+      },
+      handleOk () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            createShipmentTask(this.model).then((res) => {
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+              that.close();
+            });
+          }else{
+             return false
+          }
+        })
+      },
+      handleCancel () {
+        this.close()
+      },
+      getPortList(record) {
+        selectSupplePort(record).then((res) => {
+          if (res.success) {
+            this.portList = res.result;
+            this.model = Object.assign({}, record);
+            this.visible = true;
+          }
+        });
+      }
+
+    }
+  }
+</script>
diff --git a/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiveModal.vue b/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiveModal.vue
index 3839402..855856f 100644
--- a/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiveModal.vue
+++ b/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiveModal.vue
@@ -158,9 +158,6 @@
         this.visible = false;
         this.$refs.form.clearValidate();
       },
-      loadData() {
-        this.searchReceive();
-      },
       searchReceive() {
         const that = this;
         that.querySource.receiptCode = that.model.code;
diff --git a/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerDetailList.vue b/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerDetailList.vue
index 63c0ab9..63e921a 100644
--- a/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerDetailList.vue
+++ b/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerDetailList.vue
@@ -1,5 +1,59 @@
 <template>
   <a-card :bordered="false" :class="'cust-erp-sub-tab'">
+
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="货主">
+              <a-select
+                show-search
+                placeholder="请选择货主"
+                option-filter-prop="children"
+                :filter-option="filterOption"
+                v-model="queryParam.companyCode">
+                <a-select-option v-for="item in companyList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="物料编码">
+              <a-input placeholder="请输入物料编码" v-model="queryParam.materialCode"></a-input>
+            </a-form-item>
+          </a-col>
+          <template v-if="toggleSearchStatus">
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="物料名称">
+                <a-input placeholder="请输入物料名称" v-model="queryParam.materialName"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="库存状态">
+                <j-dict-select-tag placeholder="请选择库存状态" v-model="queryParam.inventoryStatus" dictCode="inventory_status"/>
+              </a-form-item>
+            </a-col>
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="批次">
+                <a-input placeholder="请输入批次" v-model="queryParam.batch"></a-input>
+              </a-form-item>
+            </a-col>
+          </template>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              <a @click="handleToggleSearch" style="margin-left: 8px">
+                {{ toggleSearchStatus ? '收起' : '展开' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
+              </a>
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
     <!-- 操作按钮区域 -->
     <div class="table-operator" v-if="mainId">
       <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
@@ -41,6 +95,12 @@
         :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
         @change="handleTableChange">
 
+        <span slot="companyCode" slot-scope="companyCode">
+          <a-tag :key="companyCode" color=blue>
+            {{ solutionCompany(companyCode) }}
+          </a-tag>
+        </span>
+
         <template slot="htmlSlot" slot-scope="text">
           <div v-html="text"></div>
         </template>
@@ -80,6 +140,7 @@
 
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
   import ShipmentContainerDetailModal from './modules/ShipmentContainerDetailModal'
+  import {getCompanyList} from '@/api/api'
 
   export default {
     name: "ShipmentContainerDetailList",
@@ -109,6 +170,7 @@
       return {
         description: '出库组盘管理页面',
         disableMixinCreated:true,
+        companyList:[],
         // 表头
         columns: [
           {
@@ -122,9 +184,11 @@
             }
           },
           {
-            title:'货主编码',
+            title:'货主',
             align:"center",
-            dataIndex: 'companyCode'
+            dataIndex: 'companyCode',
+            key: 'companyCode',
+            scopedSlots: { customRender: 'companyCode' }
           },
           {
             title:'物料编码',
@@ -154,7 +218,7 @@
           {
             title:'库存状态',
             align:"center",
-            dataIndex: 'inventoryStatus'
+            dataIndex: 'inventoryStatus_dictText'
           },
           {
             title:'批次',
@@ -204,6 +268,7 @@
       }
     },
     created() {
+      this.loadFrom();
     },
     computed: {
       importExcelUrl(){
@@ -215,7 +280,24 @@
         this.dataSource=[]
         this.selectedRowKeys=[]
         this.ipagination.current = 1
-      }
+      },
+      loadFrom() {
+        getCompanyList().then((res) => {
+          if (res.success) {
+            this.companyList = res.result
+          }
+        });
+      },
+      solutionCompany(value) {
+        var actions = []
+        Object.keys(this.companyList).some((key) => {
+          if (this.companyList[key].code == ('' + value)) {
+            actions.push(this.companyList[key].name)
+            return true
+          }
+        })
+        return actions.join('')
+      },
 
     }
   }
diff --git a/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerHeaderList.vue b/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerHeaderList.vue
index 9dc9be8..c5cdac3 100644
--- a/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerHeaderList.vue
+++ b/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerHeaderList.vue
@@ -119,7 +119,7 @@
         <span slot="action" slot-scope="text, record">
           <a @click="handleEdit(record)">编辑</a>
           <a-divider type="vertical" />
-          <a v-if="record.status == 0" @click="createTask(record)">生成任务</a>
+          <a v-if="record.status == 0" @click="selectPort(record)">生成任务</a>
           <a-divider type="vertical" />
           <a-dropdown>
             <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
@@ -143,6 +143,7 @@
     </a-tabs>
 
     <shipmentContainerHeader-modal ref="modalForm" @ok="modalFormOk"></shipmentContainerHeader-modal>
+    <shipmentContainerSelect-modal ref="modalForm2" @ok="modalFormOk"></shipmentContainerSelect-modal>
   </a-card>
 </template>
 
@@ -155,11 +156,14 @@
   import {initDictOptions,filterMultiDictText} from '@/components/dict/JDictSelectUtil'
   import '@/assets/less/TableExpand.less'
   import {createShipmentTask} from '@/api/api'
+  import {selectSortingPort} from '@/api/api'
+  import ShipmentContainerSelectModal from "./modules/ShipmentContainerSelectModal";
 
   export default {
     name: "ShipmentContainerHeaderList",
     mixins:[JeecgListMixin],
     components: {
+      ShipmentContainerSelectModal,
       ShipmentContainerDetailList,
       ShipmentContainerHeaderModal
     },
@@ -167,6 +171,7 @@
       return {
         description: '出库组盘管理页面',
         querySource:{},
+        portList:[],
         // 表头
         columns: [
           {
@@ -285,21 +290,9 @@
         this.selectedRowKeys = selectedRowKeys;
         this.selectionRows = selectionRows;
       },
-      createTask(record) {
-        this.loading = true;
-        const that = this;
-        this.model = Object.assign({}, record);
-        that.querySource.id = record.id;
-        createShipmentTask(that.querySource).then((res) => {
-          this.loading = false;
-          if (res.success) {
-            this.$message.success(res.message);
-          }
-          else {
-            this.$message.error(res.message);
-          }
-          this.searchQuery();
-        });
+      selectPort(record) {
+        this.$refs.modalForm2.edit(record);
+        this.$refs.modalForm2.title = "选择出库口";
       },
       loadData(arg) {
         if(!this.url.list){
diff --git a/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/shipment/modules/ShipmentContainerSelectModal.vue b/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/shipment/modules/ShipmentContainerSelectModal.vue
new file mode 100644
index 0000000..a277fd6
--- /dev/null
+++ b/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/shipment/modules/ShipmentContainerSelectModal.vue
@@ -0,0 +1,131 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    switchFullscreen
+    @ok="handleOk"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <a-spin :spinning="confirmLoading">
+      <a-form-model ref="form" :model="model" :rules="validatorRules">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="出库口"  :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toPort">
+              <a-select
+                show-search
+                placeholder="请选择出库口"
+                option-filter-prop="children"
+                :filter-option="filterOption"
+                v-model="model.toPort">
+                <a-select-option v-for="item in portList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </a-spin>
+  </j-modal>
+</template>
+
+<script>
+
+  import { httpAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+  import {createShipmentTask} from '@/api/api'
+  import {selectSortingPort} from '@/api/api'
+
+  export default {
+    name: "ShipmentContainerSelectModal",
+    portList:[],
+    components: {
+    },
+    props:{
+      mainId:{
+        type:String,
+        required:false,
+        default:''
+      }
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        model:{
+        },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+
+        confirmLoading: false,
+        validatorRules: {
+        },
+        url: {
+          createTask: "/shipment/shipmentContainerHeader/createShipmentTask",
+        }
+
+      }
+    },
+    created () {
+    //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.getPortList(record);
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+        this.$refs.form.clearValidate();
+      },
+      handleOk () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            createShipmentTask(this.model).then((res) => {
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+              that.close();
+            });
+          }else{
+             return false
+          }
+        })
+      },
+      handleCancel () {
+        this.close()
+      },
+      getPortList(record) {
+        console.log("getPortList");
+        selectSortingPort(record).then((res) => {
+          if (res.success) {
+            this.portList = res.result;
+            console.log("getPortList11");
+            this.model = Object.assign({}, record);
+            this.visible = true;
+          }
+        });
+      }
+
+    }
+  }
+</script>
diff --git a/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue b/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue
index 248bfaf..010cb5f 100644
--- a/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue
+++ b/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue
@@ -31,13 +31,13 @@
               </a-form-item>
             </a-col>
             <a-col :xl="6" :lg="7" :md="8" :sm="24">
-              <a-form-item label="是否重入">
-                <j-dict-select-tag placeholder="请选择是否重入" v-model="queryParam.isDoubleIn" dictCode="is_or_not"/>
+              <a-form-item label="起始出入口">
+                <a-input placeholder="请输入起始出入口" v-model="queryParam.fromPort"></a-input>
               </a-form-item>
             </a-col>
             <a-col :xl="6" :lg="7" :md="8" :sm="24">
-              <a-form-item label="重入库位号">
-                <a-input placeholder="请输入重入库位号" v-model="queryParam.originLocationCode"></a-input>
+              <a-form-item label="目标出入口">
+                <a-input placeholder="请输入目标出入口" v-model="queryParam.toPort"></a-input>
               </a-form-item>
             </a-col>
             <a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -46,13 +46,13 @@
               </a-form-item>
             </a-col>
             <a-col :xl="6" :lg="7" :md="8" :sm="24">
-              <a-form-item label="起始出入口">
-                <a-input placeholder="请输入起始出入口" v-model="queryParam.fromPort"></a-input>
+              <a-form-item label="是否重入">
+                <j-dict-select-tag placeholder="请选择是否重入" v-model="queryParam.isDoubleIn" dictCode="is_or_not"/>
               </a-form-item>
             </a-col>
             <a-col :xl="6" :lg="7" :md="8" :sm="24">
-              <a-form-item label="目标出入口">
-                <a-input placeholder="请输入目标出入口" v-model="queryParam.toPort"></a-input>
+              <a-form-item label="重入库位号">
+                <a-input placeholder="请输入重入库位号" v-model="queryParam.originLocationCode"></a-input>
               </a-form-item>
             </a-col>
             <a-col :xl="10" :lg="11" :md="12" :sm="24">
@@ -212,20 +212,10 @@
             align:"center",
             dataIndex: 'toLocationCode'
           },
-          // {
-          //   title:'是否空出',
-          //   align:"center",
-          //   dataIndex: 'isEmptyOut_dictText',
-          // },
           {
-            title:'是否重入',
-            align:"center",
-            dataIndex: 'isDoubleIn_dictText',
-          },
-          {
-            title:'重入库位号',
+            title:'目标出入口',
             align:"center",
-            dataIndex: 'originLocationCode'
+            dataIndex: 'toPort'
           },
           {
             title:'任务状态',
@@ -233,14 +223,14 @@
             dataIndex: 'status_dictText',
           },
           {
-            title:'起始出入口',
+            title:'是否重入',
             align:"center",
-            dataIndex: 'fromPort'
+            dataIndex: 'isDoubleIn_dictText',
           },
           {
-            title:'目标出入口',
+            title:'重入库位号',
             align:"center",
-            dataIndex: 'toPort'
+            dataIndex: 'originLocationCode'
           },
           {
             title:'创建人',
diff --git a/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue b/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue
index 4ae548f..b29f494 100644
--- a/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue
+++ b/jeecg-boot-master/ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue
@@ -212,20 +212,10 @@
             align:"center",
             dataIndex: 'toLocationCode'
           },
-          // {
-          //   title:'是否空出',
-          //   align:"center",
-          //   dataIndex: 'isEmptyOut_dictText',
-          // },
           {
-            title:'是否重入',
-            align:"center",
-            dataIndex: 'isDoubleIn_dictText',
-          },
-          {
-            title:'重入库位号',
+            title:'目标出入口',
             align:"center",
-            dataIndex: 'originLocationCode'
+            dataIndex: 'toPort'
           },
           {
             title:'任务状态',
@@ -233,14 +223,9 @@
             dataIndex: 'status_dictText',
           },
           {
-            title:'起始出入口',
+            title:'是否空出',
             align:"center",
-            dataIndex: 'fromPort'
-          },
-          {
-            title:'目标出入口',
-            align:"center",
-            dataIndex: 'toPort'
+            dataIndex: 'isEmptyOut_dictText',
           },
           {
             title:'创建人',
diff --git a/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/port/controller/PortController.java b/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/port/controller/PortController.java
index a76b3db..b4aa648 100644
--- a/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/port/controller/PortController.java
+++ b/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/port/controller/PortController.java
@@ -176,4 +176,5 @@ public class PortController extends JeecgController<Port, IPortService> {
         return super.importExcel(request, response, Port.class);
     }
 
+
 }
diff --git a/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/port/service/IPortService.java b/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/port/service/IPortService.java
index a258ee0..a8264ab 100644
--- a/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/port/service/IPortService.java
+++ b/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/port/service/IPortService.java
@@ -1,8 +1,11 @@
 package org.jeecg.modules.wms.config.port.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.common.api.vo.Result;
 import org.jeecg.modules.wms.config.port.entity.Port;
 
+import java.util.List;
+
 /**
  * @Description: 出入口
  * @Author: jeecg-boot
@@ -11,4 +14,5 @@ import org.jeecg.modules.wms.config.port.entity.Port;
  */
 public interface IPortService extends IService<Port> {
 
+    List<Port> getPortListByType(int type, String zoneCode, String warehouseCode);
 }
diff --git a/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/port/service/impl/PortServiceImpl.java b/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/port/service/impl/PortServiceImpl.java
index 1d1c813..226b9b2 100644
--- a/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/port/service/impl/PortServiceImpl.java
+++ b/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/port/service/impl/PortServiceImpl.java
@@ -1,5 +1,8 @@
 package org.jeecg.modules.wms.config.port.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import org.jeecg.common.api.vo.Result;
 import org.jeecg.modules.wms.config.port.entity.Port;
 import org.jeecg.modules.wms.config.port.mapper.PortMapper;
 import org.jeecg.modules.wms.config.port.service.IPortService;
@@ -7,6 +10,9 @@ import org.springframework.stereotype.Service;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 
+import javax.annotation.Resource;
+import java.util.List;
+
 /**
  * @Description: 出入口
  * @Author: jeecg-boot
@@ -16,4 +22,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 @Service
 public class PortServiceImpl extends ServiceImpl<PortMapper, Port> implements IPortService {
 
+    @Override
+    public List<Port> getPortListByType(int type, String zoneCode, String warehouseCode) {
+        LambdaQueryWrapper<Port> portLambdaQueryWrapper = Wrappers.lambdaQuery();
+        portLambdaQueryWrapper.eq(Port::getType, type)
+                                .eq(Port::getZoneCode, zoneCode)
+                                .eq(Port::getWarehouseCode, warehouseCode);
+        List<Port> portList = list(portLambdaQueryWrapper);
+        return portList;
+    }
 }
diff --git a/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/controller/ReceiptContainerHeaderController.java b/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/controller/ReceiptContainerHeaderController.java
index df618e5..46adb9c 100644
--- a/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/controller/ReceiptContainerHeaderController.java
+++ b/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/controller/ReceiptContainerHeaderController.java
@@ -8,12 +8,23 @@ import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.system.base.controller.JeecgController;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.system.util.JwtUtil;
+import org.jeecg.modules.wms.config.location.entity.Location;
+import org.jeecg.modules.wms.config.location.service.ILocationService;
+import org.jeecg.modules.wms.config.port.entity.Port;
+import org.jeecg.modules.wms.config.port.service.IPortService;
+import org.jeecg.modules.wms.config.zone.entity.Zone;
+import org.jeecg.modules.wms.config.zone.service.IZoneService;
 import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerDetail;
 import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerHeader;
 import org.jeecg.modules.wms.receipt.receiptContainerHeader.service.IReceiptContainerDetailService;
 import org.jeecg.modules.wms.receipt.receiptContainerHeader.service.IReceiptContainerHeaderService;
+import org.jeecg.modules.wms.shipment.shipmentContainerHeader.entity.ShipmentContainerHeader;
+import org.jeecg.utils.StringUtils;
+import org.jeecg.utils.constant.QuantityConstant;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import org.springframework.web.servlet.ModelAndView;
@@ -54,6 +65,13 @@ public class ReceiptContainerHeaderController extends JeecgController<ReceiptCon
 	@Autowired
 	private IReceiptContainerDetailService receiptContainerDetailService;
 
+	@Resource
+	private ILocationService locationService;
+	@Resource
+	private IZoneService zoneService;
+	@Resource
+	private IPortService portService;
+
 
 	/*---------------------------------主表处理-begin-------------------------------------*/
 
@@ -303,5 +321,36 @@ public class ReceiptContainerHeaderController extends JeecgController<ReceiptCon
 		 return receiptContainerHeaderService.createReceiptTask(receiptContainerHeader, warehouseCode);
 	 }
 
-
+	 /**
+	  * 选择分拣口
+	  * @return
+	  */
+	 @ApiOperation(value="出库组盘-选择分拣口", notes="出库组盘-选择分拣口")
+	 @PostMapping("/selectSupplePort")
+	 @ResponseBody
+	 public Result selectSupplePort(@RequestBody ReceiptContainerHeader receiptContainerHeader, HttpServletRequest req) {
+		 String warehouseCode = JwtUtil.getWarehouseCodeByToken(req);
+		 String fromLocationCode = receiptContainerHeader.getFromLocationCode();
+		 if(StringUtils.isEmpty(fromLocationCode)) {
+			 return Result.error("选择分拣口时, 起始库位号为空");
+		 }
+		 Location fromLocation = locationService.getLocationByCode(fromLocationCode, warehouseCode);
+		 if(fromLocation == null) {
+			 return Result.error("选择分拣口时, 根据库位号" + fromLocationCode + " 没有找到库位");
+		 }
+		 String zoneCode = fromLocation.getZoneCode();
+		 if(StringUtils.isEmpty(zoneCode)) {
+			 return Result.error("选择分拣口时, 库区编码为空");
+		 }
+		 Zone zone = zoneService.getZoneByCode(zoneCode, warehouseCode);
+		 if(zone == null) {
+			 return Result.error("选择分拣口时, 库区为空");
+		 }
+		 int type = QuantityConstant.PORT_TYPE_PICK;
+		 List<Port> portList = portService.getPortListByType(type, zoneCode, warehouseCode);
+		 if(portList.size() == 0) {
+			 return Result.error("选择分拣口时, 没有找到合适的分拣口");
+		 }
+ 		 return Result.OK(portList);
+	 }
 }
diff --git a/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/impl/ReceiveServiceImpl.java b/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/impl/ReceiveServiceImpl.java
index 3870531..39bdee6 100644
--- a/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/impl/ReceiveServiceImpl.java
+++ b/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/impl/ReceiveServiceImpl.java
@@ -82,6 +82,9 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive>  imp
         if(containerStatus.equals(QuantityConstant.STATUS_CONTAINER_LOCK)) {
             return Result.error("容器被锁定,不能用于收货");
         }
+        if(containerStatus.equals(QuantityConstant.STATUS_CONTAINER_FULL)) {
+            return Result.error("容器已经是满盘,不能用于收货");
+        }
         String containerTypeCode = container.getContainerTypeCode();
         if(StringUtils.isEmpty(containerTypeCode)) {
             return Result.error("容器类型编码为空");
diff --git a/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/controller/shipmentCombinationController.java b/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/controller/shipmentCombinationController.java
index 3d12c08..7de81ea 100644
--- a/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/controller/shipmentCombinationController.java
+++ b/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/controller/shipmentCombinationController.java
@@ -8,6 +8,12 @@ import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.system.util.JwtUtil;
+import org.jeecg.modules.wms.config.location.entity.Location;
+import org.jeecg.modules.wms.config.location.service.ILocationService;
+import org.jeecg.modules.wms.config.port.entity.Port;
+import org.jeecg.modules.wms.config.port.service.IPortService;
+import org.jeecg.modules.wms.config.zone.entity.Zone;
+import org.jeecg.modules.wms.config.zone.service.IZoneService;
 import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerHeader;
 import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader;
 import org.jeecg.modules.wms.receipt.receiving.domain.Receive;
@@ -17,6 +23,7 @@ import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentDetail;
 import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentHeader;
 import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentDetailService;
 import org.jeecg.utils.StringUtils;
+import org.jeecg.utils.constant.QuantityConstant;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
@@ -36,6 +43,12 @@ public class shipmentCombinationController {
     private IShipmentDetailService shipmentDetailService;
     @Resource
     private IShipmentCombinationService shipmentCombinationService;
+    @Resource
+    private ILocationService locationService;
+    @Resource
+    private IZoneService zoneService;
+    @Resource
+    private IPortService portService;
 
     /**
      * 获取单据列表
@@ -71,14 +84,48 @@ public class shipmentCombinationController {
     }
 
     /**
-     * 创建任务
+     * 创建出库任务
      * @return
      */
-    @ApiOperation(value="入库组盘-创建任务", notes="入库组盘-创建任务")
+    @ApiOperation(value="出库组盘-创建出库任务", notes="出库组盘-创建出库任务")
     @PostMapping("/createShipmentTask")
     @ResponseBody
     public Result createShipmentTask(@RequestBody ShipmentContainerHeader shipmentContainerHeader, HttpServletRequest req) {
         String warehouseCode = JwtUtil.getWarehouseCodeByToken(req);
         return shipmentCombinationService.createShipmentTask(shipmentContainerHeader, warehouseCode);
     }
+
+
+    /**
+     * 选择分拣口
+     * @return
+     */
+    @ApiOperation(value="出库组盘-选择分拣口", notes="出库组盘-选择分拣口")
+    @PostMapping("/selectSortingPort")
+    @ResponseBody
+    public Result selectSortingPort(@RequestBody ShipmentContainerHeader shipmentContainerHeader, HttpServletRequest req) {
+        String warehouseCode = JwtUtil.getWarehouseCodeByToken(req);
+        String fromLocationCode = shipmentContainerHeader.getFromLocationCode();
+        if(StringUtils.isEmpty(fromLocationCode)) {
+            return Result.error("选择分拣口时, 起始库位号为空");
+        }
+        Location fromLocation = locationService.getLocationByCode(fromLocationCode, warehouseCode);
+        if(fromLocation == null) {
+            return Result.error("选择分拣口时, 根据库位号" + fromLocationCode + " 没有找到库位");
+        }
+        String zoneCode = fromLocation.getZoneCode();
+        if(StringUtils.isEmpty(zoneCode)) {
+            return Result.error("选择分拣口时, 库区编码为空");
+        }
+        Zone zone = zoneService.getZoneByCode(zoneCode, warehouseCode);
+        if(zone == null) {
+            return Result.error("选择分拣口时, 库区为空");
+        }
+        int type = QuantityConstant.PORT_TYPE_PICK;
+        List<Port> portList = portService.getPortListByType(type, zoneCode, warehouseCode);
+        if(portList.size() == 0) {
+            return Result.error("选择分拣口时, 没有找到合适的分拣口");
+        }
+        return Result.OK(portList);
+    }
 }
diff --git a/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java b/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java
index b614a26..4f69058 100644
--- a/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java
+++ b/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java
@@ -415,7 +415,6 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
         if (shipmentContainerHeader == null) {
             return Result.error("生成出库任务时, 出库组盘头"  + "未找到,操作中止");
         }
-        shipmentContainerHeader = shipmentContainerHeaderService.getById(shipmentContainerHeader.getId());
         if (shipmentContainerHeader.getStatus() >= QuantityConstant.SHIPMENT_CONTAINER_TASK) {
             return Result.error("生成出库任务时, 出库组盘头" + shipmentContainerHeader.getId() + "已经生成任务,请不要重复生成,操作中止");
         }
diff --git a/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentContainerHeader/entity/ShipmentContainerDetail.java b/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentContainerHeader/entity/ShipmentContainerDetail.java
index a6af706..72d8fcf 100644
--- a/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentContainerHeader/entity/ShipmentContainerDetail.java
+++ b/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentContainerHeader/entity/ShipmentContainerDetail.java
@@ -91,6 +91,7 @@ public class ShipmentContainerDetail implements Serializable {
     private Integer inventoryDetailId;
 	/**库存状态*/
 	@Excel(name = "库存状态", width = 15)
+    @Dict(dicCode = "inventory_status")
     @ApiModelProperty(value = "库存状态")
     private String inventoryStatus;
 	/**批次*/
diff --git a/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java b/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
index 488feed..5c0fdef 100644
--- a/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
+++ b/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
@@ -622,6 +622,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea
 		}
 		List<InventoryTransaction> inventoryTransactionList = new ArrayList<>();
 		List<Integer> shipmentIdList = new ArrayList<>();
+		List<ShipmentDetail> shipmentDetailList = new ArrayList<>();
 		for(TaskDetail taskDetail : taskDetailList) {
 			ShipmentContainerDetail shipmentContainerDetail =
 					shipmentContainerDetailService.getById(taskDetail.getShipmentContainerDetailId());
@@ -639,6 +640,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea
 			} else if(shipmentDetail.getQty().compareTo(shipmentDetail.getTaskQty()) < 0) {
 				throw new ServiceException("完成出库任务时, 出库单 单据数量不能小于配盘数量");
 			}
+			shipmentDetailList.add(shipmentDetail);
 			InventoryDetail inventoryDetail =
 					inventoryDetailService.getById(taskDetail.getFromInventoryDetailId());
 			if(inventoryDetail == null) {
@@ -702,7 +704,10 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea
 			}
 			containerStatus = QuantityConstant.STATUS_CONTAINER_SOME;
 		}
-
+		success = shipmentDetailService.updateBatchById(shipmentDetailList);
+		if(!success) {
+			throw new ServiceException("完成出库任务,更新出库详情失败");
+		}
 		success = inventoryTransactionService.saveBatch(inventoryTransactionList);
 		if(!success) {
 			throw new ServiceException("完成出库任务,保存库存详情失败");
diff --git a/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/utils/constant/QuantityConstant.java b/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/utils/constant/QuantityConstant.java
index 232c4a9..9febff4 100644
--- a/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/utils/constant/QuantityConstant.java
+++ b/jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/utils/constant/QuantityConstant.java
@@ -510,6 +510,10 @@ public class QuantityConstant {
     public static final int EMPTY_OUT_PROSESS = 2;
     public static final int NORMAL_OUT = 0;
 
+    public static final int PORT_TYPE_IN = 1;
+    public static final int PORT_TYPE_OUT = 2;
+    public static final int PORT_TYPE_PICK = 3;
+
     public static final String RECEIPT_TYPE_PRODUCTON = "SC"; //生产入库单
     public static final String RECEIPT_TYPE_DIRECT_TRANSGER = "JS"; // 直接调拨单
     public static final String RECEIPT_TYPE_SALE = "SP"; //销售出库单
--
libgit2 0.22.2