From 3386c4e2a11ed345986a0b4af28e4a8630f84b41 Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期二, 13 一月 2026 18:41:35 +0800
Subject: [PATCH] 重检,盘点优化

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_BasicService/MESOperation/FeedbackMesService.cs    |   31 +
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundController.cs |   10 
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_CheckService/ReCheckOrderService.cs                |   54 +
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs             |    8 
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs                   |  115 +++
 项目代码/WIDESEA_WMSClient/src/extension/check/recheckOrder.js                                |   38 
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs                   |    2 
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs                 |   51 +
 项目代码/WIDESEA_WMSClient/src/extension/check/extend/ReCheckGroupPallet.vue                  | 1124 ++++++++++++++++++++++++++++++++++++++
 项目代码/WIDESEA_WMSClient/config/buttons.js                                                  |    8 
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs                     |  154 ++++
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundService.cs                 |    7 
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/TakeStockOrderService.cs            |   80 --
 13 files changed, 1,548 insertions(+), 134 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/config/buttons.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/config/buttons.js"
index 64174fb..b9462f7 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/config/buttons.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/config/buttons.js"
@@ -339,6 +339,14 @@
     type: 'warning',
     onClick: function () {
     }
+},{
+    name: "閲嶆缁勭洏鎿嶄綔",
+    icon: '',
+    class: '',
+    value: 'ReCheckGroupPallet',
+    type: 'warning',
+    onClick: function () {
+    }
 }
 ]
 
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/check/extend/ReCheckGroupPallet.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/check/extend/ReCheckGroupPallet.vue"
new file mode 100644
index 0000000..cea7cce
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/check/extend/ReCheckGroupPallet.vue"
@@ -0,0 +1,1124 @@
+<template>
+  <vol-box v-model="show" :title="'缁勭洏鎿嶄綔 - 鍗曟嵁鍙凤細' + orderNo" :height="1000" :width="1100" :padding="20" :modal="true">
+    <div class="barcode-scanner-container">
+
+      <!-- 浠撳簱閫夋嫨 - 绱у噾甯冨眬 -->
+      <div class="location-section compact">
+        <el-form :model="form" :rules="rules" ref="locationForm" class="compact-form">
+          <el-form-item label="鍏ュ簱浠撳簱" prop="warehouseType" class="location-select compact-item">
+            <el-select v-model="form.warehouseType" placeholder="璇烽�夋嫨浠撳簱" clearable filterable
+              @change="handleWarehouseChange" style="width: 100%" :loading="warehouseLoading" size="medium">
+              <el-option v-for="item in warehouseTypes" :key="item.warehouseType" :label="item.warehouseTypeDesc"
+                :value="item.warehouseType" />
+            </el-select>
+          </el-form-item>
+        </el-form>
+      </div>
+
+      <!-- 浠撳簱鍖哄煙閫夋嫨 - 绱у噾甯冨眬 -->
+      <div class="location-section compact">
+        <el-form :model="form" :rules="rules" ref="locationForm" class="compact-form">
+          <el-form-item label="浠撳簱鍖哄煙" prop="locationType" class="location-select compact-item">
+            <el-select v-model="form.locationType" placeholder="璇峰厛閫夋嫨浠撳簱" clearable filterable
+              @change="handleLocationChange" style="width: 100%" :loading="locationLoading" size="medium">
+              <el-option v-for="item in locationTypes" :key="item.locationType" :label="item.locationTypeDesc"
+                :value="item.locationType" />
+            </el-select>
+          </el-form-item>
+        </el-form>
+      </div>
+
+      <!-- 鎵樼洏淇℃伅鏄剧ず - 绱у噾甯冨眬 -->
+      <div class="tray-info compact" v-if="trayBarcode">
+        <i class="el-icon-s-management"></i> 褰撳墠鏂欑: {{ trayBarcode }}
+        <span class="location-info" v-if="form.warehouseType">
+          | 浠撳簱: {{ currentWarehouseName }}
+        </span>
+        <span class="location-info" v-if="form.locationType">
+          | 浠撳簱鍖哄煙: {{ currentLocationDesc }}
+        </span>
+      </div>
+
+      <!-- 鎵爜鍖哄煙 - 绱у噾甯冨眬 -->
+      <div class="input-section compact">
+        <el-card shadow="hover" class="compact-card">
+          <div slot="header" class="compact-header">
+            <span><i class="el-icon-scanner"></i> 鎵爜鍖哄煙</span>
+            <span class="scan-status">
+              <span class="scan-indicator"></span>
+              {{ form.locationType && form.warehouseType ? '鎵爜灏辩华' : '璇峰厛閫夋嫨浠撳簱鍜屼粨搴撳尯鍩�' }}
+            </span>
+          </div>
+
+          <!-- 鎵樼洏鏉$爜杈撳叆 -->
+          <div class="input-wrapper custom-input-group compact-input">
+            <div class="input-label">鎵樼洏鏉$爜</div>
+            <el-input ref="trayInput" v-model="trayBarcode" placeholder="璇锋壂鎻忔垨杈撳叆鏂欑鐮佸悗鎸夊洖杞﹂敭" clearable
+              :disabled="!form.locationType || !form.warehouseType" @keyup.enter.native="handleTraySubmit"
+              @clear="handleTrayClear" @input="handleTrayInput" class="custom-input" size="medium">
+              <template slot="append">
+                <el-button @click="handleTraySubmit" type="primary" icon="el-icon-position"
+                  :disabled="!form.locationType || !trayBarcode || !form.warehouseType" size="medium">
+                  纭
+                </el-button>
+              </template>
+            </el-input>
+          </div>
+
+          <!-- 鐗╂枡鏉$爜杈撳叆 -->
+          <div class="input-wrapper custom-input-group compact-input">
+            <div class="input-label">鐗╂枡鏉$爜</div>
+            <el-input ref="barcodeInput" v-model="barcode" placeholder="璇锋壂鎻忔垨杈撳叆鐗╂枡鏉$爜鍚庢寜鍥炶溅閿�" clearable
+              :disabled="!form.locationType || !trayBarcode || !form.warehouseType"
+              @keyup.enter.native="handleBarcodeSubmit" @clear="handleClear" @input="handleBarcodeInput"
+              class="custom-input" size="medium">
+              <template slot="append">
+                <el-button :loading="loading" @click="handleBarcodeSubmit" type="primary" icon="el-icon-search"
+                  :disabled="!form.locationType || !trayBarcode || !barcode || !from.warehouseType" size="medium">
+                  {{ loading ? '鏌ヨ涓�...' : '鏌ヨ' }}
+                </el-button>
+              </template>
+            </el-input>
+          </div>
+
+          <div class="input-tips compact-tips">
+            <p>鎻愮ず锛氳鍏堥�夋嫨浠撳簱 鈫� 閫夋嫨浠撳簱鍖哄煙 鈫� 杈撳叆鏂欑鐮� 鈫� 杈撳叆鐗╂枡鏉$爜</p>
+            <p v-if="!form.warehouseType" class="warning-text">鈿狅笍 璇峰厛閫夋嫨浠撳簱</p>
+            <p v-if="!form.locationType && !form.warehouseType" class="warning-text">鈿狅笍 璇峰厛閫夋嫨浠撳簱鍖哄煙</p>
+            <p v-if="form.warehouseType && form.locationType && !trayBarcode" class="warning-text">鈿狅笍 璇峰厛杈撳叆鏂欑鐮�</p>
+          </div>
+
+        </el-card>
+      </div>
+
+      <!-- 鍔犺浇鐘舵�� -->
+      <div v-if="loading" class="loading compact">
+        <el-progress :percentage="100" status="success" :show-text="false" />
+        <p>姝e湪鏌ヨ鐗╂枡淇℃伅...</p>
+      </div>
+
+      <!-- 閿欒鎻愮ず -->
+      <div v-if="error" class="error-message compact">
+        <el-alert :title="error" type="error" show-icon closable @close="error = ''" />
+      </div>
+
+      <!-- 鏈粍鐩樺垪琛� -->
+      <div class="unpallet-section compact">
+        <el-card shadow="hover" class="compact-card unpallet-card">
+          <div slot="header" class="compact-header">
+            <span><i class="el-icon-tickets"></i> 鏈粍鐩樻潯鐮�</span>
+            <span class="list-actions">
+              <el-tag type="primary" size="small">鏈粍鐩� {{ totalStockCount }}</el-tag>
+            </span>
+          </div>
+
+
+          <div class="table-container">
+            <el-table :data="unpalletMaterials" stripe style="width: 100%" height="100%" size="small"
+              v-loading="unpalletBarcodesLoading">
+              <el-table-column type="index" label="搴忓彿" width="60" align="center"></el-table-column>
+              <el-table-column prop="barcode" label="鏉$爜" min-width="140" show-overflow-tooltip></el-table-column>
+              <el-table-column prop="materielCode" label="鐗╂枡缂栫爜" min-width="150" show-overflow-tooltip></el-table-column>
+              <el-table-column prop="batchNo" label="鎵规" min-width="150" show-overflow-tooltip></el-table-column>
+              <el-table-column prop="orderQuantity" label="鏁伴噺" min-width="130" align="right"></el-table-column>
+              <el-table-column prop="unit" label="鍗曚綅" width="80" align="center"></el-table-column>
+              <el-table-column prop="supplyCode" label="渚涘簲鍟�" min-width="130" show-overflow-tooltip></el-table-column>
+            </el-table>
+          </div>
+        </el-card>
+
+      </div>
+
+      <!-- 鐗╂枡鍒楄〃 - 鍥哄畾楂樺害甯︽粴鍔ㄦ潯 -->
+      <div class="material-list compact">
+        <el-card shadow="hover" class="compact-card">
+          <div slot="header" class="compact-header">
+            <span><i class="el-icon-tickets"></i> 缁勭洏鏁版嵁</span>
+            <span class="list-actions">
+              <el-tag type="primary" size="small">鍏� {{ materials.length }} 鏉�</el-tag>
+              <el-tag type="primary" size="small">鏈叆搴撴暟閲� {{ totalStockSum }}{{ uniqueUnit }}</el-tag>
+              <el-tag v-if="trayBarcode" type="success" size="small">鎵樼洏: {{ trayBarcode }}</el-tag>
+              <el-tag v-if="form.warehouseType" type="info" size="small">浠撳簱: {{ currentWarehouseName }}</el-tag>
+              <el-tag v-if="form.locationType" type="info" size="small">鍖哄煙: {{ currentLocationDesc }}</el-tag>
+            </span>
+          </div>
+
+          <div v-if="materials.length === 0" class="empty-state compact">
+            <i class="el-icon-document"></i>
+            <p v-if="!form.warehouseType">璇峰厛閫夋嫨浠撳簱</p>
+            <p v-if="!form.locationType">璇峰厛閫夋嫨浠撳簱鍖哄煙</p>
+            <p v-else-if="!trayBarcode">璇峰厛杈撳叆鏂欑鏉$爜</p>
+            <p v-else>鏆傛棤鐗╂枡鏁版嵁锛岃鎵弿鎴栬緭鍏ョ墿鏂欐潯鐮�</p>
+          </div>
+
+          <div class="table-container" v-else>
+            <el-table :data="materials" stripe style="width: 100%" height="100%" size="small">
+              <el-table-column type="index" label="搴忓彿" width="60" align="center"></el-table-column>
+              <el-table-column prop="barcode" label="鏉$爜" min-width="140" show-overflow-tooltip></el-table-column>
+              <el-table-column prop="materielCode" label="鐗╂枡缂栫爜" min-width="150" show-overflow-tooltip></el-table-column>
+              <el-table-column prop="batchNo" label="鎵规" min-width="150" show-overflow-tooltip></el-table-column>
+              <el-table-column prop="stockQuantity" label="鏁伴噺" min-width="130" align="right"></el-table-column>
+              <el-table-column prop="unit" label="鍗曚綅" width="80" align="center"></el-table-column>
+              <el-table-column prop="supplyCode" label="渚涘簲鍟�" min-width="130" show-overflow-tooltip></el-table-column>
+              <el-table-column prop="warehouseType" label="浠撳簱" min-width="120" show-overflow-tooltip></el-table-column>
+            </el-table>
+          </div>
+        </el-card>
+      </div>
+    </div>
+    <template #footer>
+      <el-button type="danger" size="small" @click="handleDialogClose()">鍏抽棴</el-button>
+    </template>
+  </vol-box>
+</template>
+<script>
+import http from '@/api/http.js';
+import VolBox from '@/components/basic/VolBox.vue';
+
+export default {
+  components: { VolBox },
+  data() {
+    return {
+      show: false,
+      orderNo: "",
+      palletVisible: this.visible,
+      trayBarcodeReg: /^[A-Z]\d{9}$/,
+      trayBarcode: '',
+      barcode: '',
+      materials: [],
+      loading: false,
+      error: '',
+      debugMode: false,
+      currentFocus: 'warehouse',
+
+      unpalletBarcodes: [],
+      unpalletBarcodesLoading: false,
+      unpalletMaterials: [], // 鏈粍鐩樿缁嗘暟鎹垪琛�
+
+      // 鎵爜鏋浉鍏冲彉閲�
+      scanCode: '',
+      lastKeyTime: null,
+      isManualInput: false,
+      isScanning: false,
+      scanTimer: null,
+      manualInputTimer: null,
+      scanTarget: 'tray', // 褰撳墠鎵爜鐩爣: tray 鎴� material
+
+      // 搴撳瓨缁熻鐩稿叧鍙橀噺
+      totalStockSum: 0,
+      totalStockCount: 0,
+      uniqueUnit: '',
+      sumLoading: false,
+      sumError: '',
+      // 浠撳簱鐩稿叧鍙橀噺
+      warehouseTypes: [],
+      warehouseLoading: false,
+      // 浠撳簱鍖哄煙鐩稿叧鍙橀噺
+      locationTypes: [],
+      locationLoading: false,
+      form: {
+        warehouseType: null,
+        locationType: null
+      },
+      rules: {
+        locationType: [
+          {
+            validator: this.validateLocationType,
+            trigger: 'change'
+          }
+        ],
+        trayBarcode: [
+          {
+            pattern: this.trayBarcodeReg,
+            message: '鎵樼洏鍙锋牸寮忛敊璇紙闇�涓�1涓ぇ鍐欏瓧姣�+9涓暟瀛楋紝濡侫000008024锛�',
+            trigger: 'blur'
+          }
+        ],
+        warehouseType: [
+          {
+            message: '璇烽�夋嫨浠撳簱',
+            trigger: 'change'
+          }
+        ]
+      }
+    }
+  },
+
+  computed: {
+    // 褰撳墠閫夋嫨鐨勪粨搴撳悕绉�
+    currentWarehouseName() {
+      const warehouse = this.warehouseTypes.find(item => item.warehouseType === this.form.warehouseType);
+      return warehouse ? warehouse.warehouseTypeDesc : '';
+    },
+    // 褰撳墠閫夋嫨鐨勪粨搴撳尯鍩熸弿杩�
+    currentLocationDesc() {
+      const location = this.locationTypes.find(item => item.locationType === this.form.locationType)
+      return location ? location.locationTypeDesc : ''
+    }
+  },
+  watch: {
+    visible(newVal, oldVal) {
+      this.palletVisible = newVal;
+
+      // 褰撲粠 false 鍙樹负 true 鏃讹紝琛ㄧず寮规鎵撳紑
+      if (newVal === true && oldVal === false) {
+        console.log('寮规鎵撳紑锛岄噸缃暟鎹�');
+        this.resetData();
+        this.$nextTick(() => {
+          setTimeout(() => {
+            this.fetchUnpalletMaterialDetails();
+          }, 300);
+        });
+      }
+
+      // 褰撲粠 true 鍙樹负 false 鏃讹紝琛ㄧず寮规鍏抽棴
+      if (newVal === false && oldVal === true) {
+        console.log('寮规鍏抽棴锛岄噸缃暟鎹�');
+        this.resetData();
+      }
+    },
+    palletVisible(newVal) {
+      this.$emit('update:visible', newVal);
+    },
+    docNo(newVal) {
+      if (newVal) {
+        this.palletForm = { palletCode: '', barcode: '' };
+        this.backData = [];
+        this.$refs.palletForm?.reset();
+        this.fetchUnpalletMaterialDetails();
+      }
+    }
+  },
+  mounted() {
+    document.addEventListener('keypress', this.handleKeyPress);
+  },
+  beforeDestroy() {
+    document.removeEventListener('keypress', this.handleKeyPress);
+    this.clearAllTimers();
+  },
+  methods: {
+    open() {
+      this.show = true;
+      this.orderNo = "";
+      this.resetData();
+      this.initLocationTypes();
+      this.initwarehouseTypes();
+      this.fetchUnpalletMaterialDetails();
+    },
+    validateLocationType(rule, value, callback) {
+      if (!this.form.warehouseType) {
+        callback(new Error('璇峰厛閫夋嫨浠撳簱'));
+      } else if (value === null || value === undefined || value === '') {
+        callback(new Error('璇烽�夋嫨浠撳簱鍖哄煙'));
+      } else {
+        callback();
+      }
+    },
+
+    // 鏍规嵁鏉$爜鍒楄〃鑾峰彇璇︾粏鏁版嵁
+    async fetchUnpalletMaterialDetails() {
+      try {
+        const response = await http.post('/api/InboundOrder/UnPalletGroupBarcode?orderNo=' + this.orderNo, {});
+        if (response.status && Array.isArray(response.data)) {
+          this.unpalletMaterials = response.data;
+          this.unpalletBarcodes = response.data.map(item => item.barcode || '');
+          this.totalStockCount = response.data.length;
+        } else {
+          this.unpalletMaterials = [];
+        }
+      } catch (err) {
+        this.unpalletMaterials = this.unpalletBarcodes.map(barcode => ({
+          barcode: barcode,
+          materielCode: '-',
+          batchNo: '-',
+          stockQuantity: '-',
+          unit: '-',
+          supplyCode: '-',
+          warehouseType: '-'
+        }));
+      }
+    },
+    async initLocationTypes() {
+      try {
+        const { data } = await this.http.post("api/LocationInfo/GetLocationTypes")
+        this.locationTypes = data
+      } catch (e) {
+        this.$message.error('鑾峰彇鍖哄煙绫诲瀷澶辫触')
+      }
+    },
+    async initwarehouseTypes() {
+      try {
+        const { data } = await this.http.post("api/Warehouse/GetwarehouseTypes")
+        this.warehouseTypes = data
+      } catch (e) {
+        this.$message.error('鑾峰彇鍖哄煙绫诲瀷澶辫触')
+      }
+    },
+
+    async fetchStockStatistics(orderNo) {
+      // 鍗曟嵁鍙蜂负绌烘椂涓嶆煡璇�
+      if (!orderNo) {
+        this.sumError = '鍗曟嵁鍙蜂负绌猴紝鏃犳硶缁熻';
+        return;
+      }
+
+      this.sumLoading = true;
+      this.sumError = '';
+      try {
+        const response = await http.post('/api/InboundOrder/UnPalletQuantity?orderNo=' + orderNo, {});
+        if (response.data) {
+          this.totalStockSum = response.data.stockSumQuantity || 0;
+          this.totalStockCount = response.data.stockCount || 0;
+          this.uniqueUnit = response.data.uniqueUnit || '';
+        }
+      } catch (err) {
+        this.sumError = '缁熻鍔犺浇澶辫触';
+        this.totalStockSum = 0;
+        this.totalStockCount = 0;
+      } finally {
+        this.sumLoading = false;
+      }
+    },
+
+    async validateForm() {
+      return new Promise((resolve) => {
+        if (!this.$refs.locationForm) {
+          this.error = '琛ㄥ崟鏈垵濮嬪寲';
+          this.$message.warning('璇峰厛閫夋嫨浠撳簱鍖哄煙');
+          resolve(false);
+          return;
+        }
+
+        this.$refs.locationForm.validate((valid) => {
+          if (valid) {
+            this.error = '';
+            resolve(true);
+          } else {
+            if (!this.from.warehouseType) {
+              this.error = '璇峰厛閫夋嫨浠撳簱';
+            }
+            else if (this.form.locationType === null || this.form.locationType === undefined || this.form.locationType === '') {
+              this.error = '璇峰厛閫夋嫨浠撳簱鍖哄煙';
+            } else {
+              this.error = '璇锋鏌ヨ〃鍗曞~鍐欐槸鍚︽纭�';
+            }
+            resolve(false);
+          }
+        });
+      });
+    },
+    // 鑱氱劍鍒版墭鐩樿緭鍏ユ
+    focusTrayInput() {
+      if (this.$refs.trayInput && this.$refs.trayInput.$el) {
+        const inputEl = this.$refs.trayInput.$el.querySelector('input');
+        if (inputEl) {
+          inputEl.focus();
+          this.currentFocus = 'tray';
+          this.scanTarget = 'tray';
+          inputEl.select();
+        }
+      }
+    },
+
+    // 鑱氱劍鍒扮墿鏂欒緭鍏ユ
+    focusBarcodeInput() {
+      if (this.$refs.barcodeInput && this.$refs.barcodeInput.$el) {
+        const inputEl = this.$refs.barcodeInput.$el.querySelector('input');
+        if (inputEl) {
+          inputEl.focus();
+          this.currentFocus = 'material';
+          this.scanTarget = 'material';
+          inputEl.select();
+        }
+      }
+    },
+    // 閲嶇疆鎵�鏈夋暟鎹�
+    resetData() {
+      this.trayBarcode = '';
+      this.barcode = '';
+      this.materials = [];
+      this.unpalletBarcodes = [];
+      this.unpalletMaterials = [];
+      this.loading = false;
+      this.error = '';
+      this.scanCode = '';
+      this.lastKeyTime = null;
+      this.isManualInput = false;
+      this.isScanning = false;
+      this.currentFocus = 'warehouse';
+      this.scanTarget = 'tray';
+      this.clearAllTimers();
+      this.totalStockSum = 0;
+      this.totalStockCount = 0;
+      this.sumLoading = false;
+      this.sumError = '';
+      this.form = {
+        warehouseType: null,
+        locationType: null
+      }
+      this.warehouseTypes = [];
+      this.locationTypes = [];
+      // 娓呴櫎琛ㄥ崟楠岃瘉鐘舵��
+      this.$nextTick(() => {
+        if (this.$refs.locationForm) {
+          this.$refs.locationForm.clearValidate();
+        }
+      });
+    },
+
+    // 娓呴櫎鎵�鏈夎鏃跺櫒
+    clearAllTimers() {
+      if (this.manualInputTimer) {
+        clearTimeout(this.manualInputTimer);
+        this.manualInputTimer = null;
+      }
+      if (this.scanTimer) {
+        clearTimeout(this.scanTimer);
+        this.scanTimer = null;
+      }
+    },
+    handleDialogClose() {
+      this.show = false;
+      this.resetData();
+    },
+
+    // 纭鎸夐挳
+    async handleConfirm() {
+      if (!await this.validateForm()) return;
+
+      if (this.materials.length === 0) {
+        this.$message.warning('璇疯嚦灏戞坊鍔犱竴涓墿鏂�');
+        return;
+      }
+
+      if (!this.trayBarcode) {
+        this.$message.warning('璇疯緭鍏ユ墭鐩樻潯鐮�');
+        return;
+      }
+
+      const result = {
+        warehouseType: this.form.warehouseType,
+        warehouseName: this.currentWarehouseName,
+        locationType: this.form.locationType,
+        locationDesc: this.currentLocationDesc,
+        trayBarcode: this.trayBarcode,
+        materials: this.materials,
+        docNo: this.docNo
+      };
+
+      // 瑙﹀彂鐖剁粍浠剁殑 back-success 浜嬩欢
+      this.$emit('back-success', result);
+      this.palletVisible = false;
+    },
+    // 澶勭悊鎵樼洏杈撳叆
+    handleTrayInput() {
+      // 鏍囪涓烘墜鍔ㄨ緭鍏ユā寮�
+      this.isManualInput = true;
+      this.isScanning = false;
+
+      // 娓呴櫎涔嬪墠鐨勮鏃跺櫒
+      if (this.manualInputTimer) {
+        clearTimeout(this.manualInputTimer);
+      }
+
+      // 璁剧疆璁℃椂鍣紝濡傛灉涓�娈垫椂闂村唴娌℃湁杈撳叆锛屽垯閲嶇疆涓烘壂鐮佹ā寮�
+      this.manualInputTimer = setTimeout(() => {
+        this.isManualInput = false;
+      }, 1000);
+    },
+
+    // 澶勭悊鐗╂枡杈撳叆
+    handleBarcodeInput() {
+      // 鏍囪涓烘墜鍔ㄨ緭鍏ユā寮�
+      this.isManualInput = true;
+      this.isScanning = false;
+
+      // 娓呴櫎涔嬪墠鐨勮鏃跺櫒
+      if (this.manualInputTimer) {
+        clearTimeout(this.manualInputTimer);
+      }
+
+      // 璁剧疆璁℃椂鍣紝濡傛灉涓�娈垫椂闂村唴娌℃湁杈撳叆锛屽垯閲嶇疆涓烘壂鐮佹ā寮�
+      this.manualInputTimer = setTimeout(() => {
+        this.isManualInput = false;
+      }, 1000);
+    },
+
+    // 澶勭悊鎵樼洏鏉$爜鎻愪氦
+    async handleTraySubmit() {
+      // 鍏堢洿鎺ユ鏌ocationType锛岄伩鍏嶈〃鍗曢獙璇佺殑寮傛闂
+      if (!this.form.warehouseType) {
+        this.error = '璇峰厛閫夋嫨浠撳簱';
+        return;
+      }
+      if (!this.form.locationType) {
+        this.error = '璇峰厛閫夋嫨浠撳簱鍖哄煙';
+        //this.$message.warning('璇峰厛閫夋嫨浠撳簱鍖哄煙');
+        return;
+      }
+
+      // 鐒跺悗鍐嶈繘琛屽畬鏁寸殑琛ㄥ崟楠岃瘉
+      if (!await this.validateForm()) return;
+
+      const currentTrayBarcode = this.trayBarcode.trim();
+
+      if (!currentTrayBarcode) {
+        this.error = '璇疯緭鍏ユ垨鎵弿鎵樼洏鏉$爜';
+        return;
+      }
+
+      this.error = '';
+
+      if (!this.trayBarcodeReg.test(currentTrayBarcode)) {
+        // ElMessage.warning({
+        //   message: '鎵樼洏鍙锋牸寮忛敊璇�',
+        //   type: 'warning',
+        //   duration: 3000
+        // })
+        this.$message("鎵樼洏鍙锋牸寮忛敊璇�");
+        this.focusTrayInput();
+        return;
+      }
+
+      // 璁剧疆鎵樼洏鏉$爜鍚庯紝鑷姩鑱氱劍鍒扮墿鏂欒緭鍏ユ
+      this.focusBarcodeInput();
+
+      // this.$message({
+      //   message: `鎵樼洏鏉$爜宸茶缃�: ${currentTrayBarcode}`,
+      //   type: 'success',
+      //   duration: 2000
+      // });
+      this.$message.success(`鎵樼洏鏉$爜宸茶缃�: ${currentTrayBarcode}`);
+    },
+
+    // 娓呴櫎鎵樼洏
+    clearTray() {
+      this.trayBarcode = '';
+      this.materials = [];
+      this.focusTrayInput();
+      this.$message({
+        message: '鎵樼洏鏉$爜宸叉竻闄�',
+        type: 'info',
+        duration: 2000
+      });
+    },
+
+    // 娓呯┖鎵樼洏杈撳叆
+    handleTrayClear() {
+      this.error = '';
+    },
+
+    // 娓呯┖杈撳叆
+    handleClear() {
+      this.error = '';
+      this.scanCode = '';
+      this.isManualInput = false;
+      this.isScanning = false;
+    },
+
+
+    // 澶勭悊鐗╂枡鏉$爜鎻愪氦
+    async handleBarcodeSubmit() {
+      if (!await this.validateForm()) return;
+      const currentBarcode = this.barcode.trim();
+
+      if (!this.trayBarcode) {
+        this.error = '璇峰厛杈撳叆鎵樼洏鏉$爜';
+        this.focusTrayInput();
+        return;
+      }
+
+      if (!currentBarcode) {
+        this.error = '璇疯緭鍏ユ垨鎵弿鐗╂枡鏉$爜';
+        return;
+      }
+
+      this.focusBarcodeInput();
+      this.error = '';
+      this.loading = true;
+
+      try {
+        // 璋冪敤API鏌ヨ鐗╂枡淇℃伅
+        const materialData = await this.fetchMaterialData(currentBarcode);
+        if (!materialData || materialData.length === 0) {
+          return;
+        }
+
+        this.materials = [];
+        materialData.forEach(item => {
+          this.materials.push({
+            ...item,
+            trayCode: this.trayBarcode,
+            locationType: this.form.locationType,
+            locationDesc: this.currentLocationDesc,
+            scanTime: this.formatTime(new Date())
+          });
+        });
+        this.orderNo = materialData[0].orderNo;
+        await this.fetchStockStatistics(materialData[0].orderNo);
+        await this.fetchUnpalletMaterialDetails();
+        // 娓呯┖鐗╂枡杈撳叆妗嗗苟淇濇寔鑱氱劍
+        this.barcode = '';
+        this.scanCode = ''; // 娓呯┖鎵爜缂撳瓨
+        this.isScanning = false;
+
+        setTimeout(() => {
+          this.focusBarcodeInput();
+        }, 100);
+      } catch (err) {
+        this.error = err.message || '鏌ヨ鏉$爜淇℃伅澶辫触锛岃閲嶈瘯';
+        this.focusBarcodeInput();
+        setTimeout(() => {
+          // 閫変腑杈撳叆妗嗗唴鐨勯敊璇唴瀹癸紙纭繚focus瀹屾垚鍚庢墽琛岋級
+          const inputEl = this.$refs.barcodeInput?.$el?.querySelector('input');
+          if (inputEl) inputEl.select();
+        }, 100);
+      } finally {
+        this.loading = false;
+      }
+    },
+
+    // API璇锋眰 - 鏇挎崲涓哄疄闄呯殑API璋冪敤
+    async fetchMaterialData(barcode) {
+      try {
+        const response = await http.post('/api/Inbound/ReCheckGroupPallet',
+          {
+            palletCode: this.trayBarcode,
+            barcode: barcode,
+            locationTypeDesc: this.currentLocationDesc,
+            locationType: this.form.locationType, // 娣诲姞浠撳簱鍖哄煙淇℃伅
+            warehouseType: this.form.warehouseType
+          }
+        );
+        let materialData;
+
+        if (typeof response.data === 'string') {
+
+          try {
+            materialData = JSON.parse(response.data);
+          } catch (e) {
+
+          }
+        } else {
+          materialData = response.data;
+        }
+        if (!response.status) {
+          this.error = response.message || '鏌ヨ鏉$爜淇℃伅澶辫触锛岃閲嶈瘯';
+        }
+
+        return materialData;
+
+      } catch (error) {
+        console.error('API璋冪敤澶辫触:', error);
+      }
+    },
+
+    // 澶勭悊鎵爜鏋緭鍏�
+    handleKeyPress(event) {
+      // 濡傛灉鏄墜鍔ㄨ緭鍏ユā寮忥紝涓嶅鐞嗘壂鐮佹灙閫昏緫
+      if (this.isManualInput) {
+        return;
+      }
+
+      const key = event.key;
+      const currentTime = new Date().getTime();
+
+      // 蹇界暐鐩存帴鎸変笅鐨勫洖杞﹂敭锛堢敱handleBarcodeSubmit澶勭悊锛�
+      if (key === 'Enter') {
+        if (this.scanCode.length > 0) {
+          // 闃绘榛樿鍥炶溅琛屼负锛岄伩鍏嶈〃鍗曟彁浜�
+          event.preventDefault();
+
+          // 鎵爜瀹屾垚锛岃嚜鍔ㄨЕ鍙戞煡璇�
+          this.isScanning = false;
+
+          // 鏍规嵁褰撳墠鎵爜鐩爣璁剧疆鐩稿簲鐨勮緭鍏ユ鍊�
+          if (this.scanTarget === 'tray') {
+            this.trayBarcode = this.scanCode;
+            this.handleTraySubmit();
+          } else if (this.scanTarget === 'material') {
+            this.barcode = this.scanCode;
+            this.handleBarcodeSubmit();
+          }
+        }
+        this.scanCode = '';
+        this.lastKeyTime = null;
+        return;
+      }
+
+      // 鏋勫缓鎵爜鍐呭锛堝揩閫熻繛缁緭鍏ヨ涓烘壂鐮侊級
+      if (this.lastKeyTime && currentTime - this.lastKeyTime < 50) {
+        this.scanCode += key;
+        this.isScanning = true;
+      } else {
+        this.scanCode = key;
+        this.isScanning = true;
+      }
+
+      // 璁剧疆璁℃椂鍣紝濡傛灉涓�娈垫椂闂村唴娌℃湁杈撳叆锛屽垯閲嶇疆鎵弿鐘舵��
+      if (this.scanTimer) {
+        clearTimeout(this.scanTimer);
+      }
+      this.scanTimer = setTimeout(() => {
+        this.isScanning = false;
+      }, 100);
+
+      this.lastKeyTime = currentTime;
+    },
+
+    // 鏍煎紡鍖栨椂闂�
+    formatTime(date) {
+      const year = date.getFullYear();
+      const month = String(date.getMonth() + 1).padStart(2, '0');
+      const day = String(date.getDate()).padStart(2, '0');
+      const hours = String(date.getHours()).padStart(2, '0');
+      const minutes = String(date.getMinutes()).padStart(2, '0');
+      const seconds = String(date.getSeconds()).padStart(2, '0');
+
+      return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+    }
+  }
+}
+</script>
+
+<style scoped>
+.barcode-scanner-container {
+  max-width: 1200px;
+  margin: 0 auto;
+  padding: 10px;
+  display: flex;
+  flex-direction: column;
+  height: 100%;
+  gap: 8px;
+}
+
+/* 绱у噾甯冨眬鏍峰紡 */
+.compact {
+  margin-bottom: 0;
+}
+
+.compact-form {
+  margin-bottom: 0;
+}
+
+.compact-item {
+  margin-bottom: 0;
+}
+
+.compact-card {
+  margin-bottom: 0;
+}
+
+.compact-card>>>.el-card__body {
+  padding: 12px;
+}
+
+.compact-header {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 0 !important;
+}
+
+.compact-header>>>.el-card__header {
+  padding: 8px 12px;
+}
+
+.compact-input {
+  margin: 8px 0;
+}
+
+.compact-tips {
+  margin-top: 8px;
+  font-size: 11px;
+}
+
+/* 浠撳簱鍖哄煙閫夋嫨 - 绱у噾 */
+.location-section.compact {
+  margin-bottom: 8px;
+}
+
+.location-section.compact>>>.el-form-item {
+  margin-bottom: 0;
+}
+
+/* 鎵樼洏淇℃伅 - 绱у噾 */
+.tray-info.compact {
+  padding: 6px 10px;
+  margin-bottom: 8px;
+  font-size: 13px;
+}
+
+/* 鎵爜鍖哄煙 - 绱у噾 */
+.input-section.compact {
+  margin-bottom: 8px;
+  flex-shrink: 0;
+}
+
+/* 鐗╂枡鍒楄〃 - 鍥哄畾楂樺害甯︽粴鍔� */
+.material-list.compact {
+  flex: 1;
+  min-height: 0;
+  /* 閲嶈锛氬厑璁竑lex瀛愰」鏀剁缉 */
+  display: flex;
+  flex-direction: column;
+}
+
+.material-list.compact>>>.el-card {
+  display: flex;
+  flex-direction: column;
+  height: 100%;
+}
+
+.material-list.compact>>>.el-card__body {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+  padding: 0;
+  min-height: 0;
+}
+
+.table-container {
+  flex: 1;
+  min-height: 0;
+  overflow: hidden;
+}
+
+.material-list.compact>>>.el-table {
+  flex: 1;
+}
+
+.material-list.compact>>>.el-table__body-wrapper {
+  overflow-y: auto;
+}
+
+/* 绱у噾鐨勭┖鐘舵�� */
+.empty-state.compact {
+  padding: 20px 0;
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.empty-state.compact i {
+  font-size: 36px;
+  margin-bottom: 8px;
+}
+
+.empty-state.compact p {
+  font-size: 13px;
+}
+
+/* 鍏朵粬鍘熸湁鏍峰紡璋冩暣 */
+.page-title {
+  text-align: center;
+  margin-bottom: 15px;
+}
+
+.scan-status {
+  font-size: 12px;
+  color: #67C23A;
+}
+
+.scan-indicator {
+  display: inline-block;
+  width: 8px;
+  height: 8px;
+  border-radius: 50%;
+  background-color: #67C23A;
+  margin-right: 5px;
+  animation: pulse 1.5s infinite;
+}
+
+@keyframes pulse {
+  0% {
+    opacity: 1;
+  }
+
+  50% {
+    opacity: 0.4;
+  }
+
+  100% {
+    opacity: 1;
+  }
+}
+
+.input-wrapper {
+  position: relative;
+}
+
+.input-tips {
+  margin-top: 6px;
+  color: #909399;
+}
+
+.warning-text {
+  color: #E6A23C;
+  font-weight: bold;
+}
+
+.loading.compact {
+  text-align: center;
+  margin: 10px 0;
+  padding: 5px;
+}
+
+.loading.compact p {
+  margin-top: 5px;
+  color: #409EFF;
+  font-size: 12px;
+}
+
+.error-message.compact {
+  margin: 5px 0;
+}
+
+.error-message.compact>>>.el-alert {
+  padding: 6px 12px;
+}
+
+.list-actions {
+  display: flex;
+  align-items: center;
+  gap: 4px;
+}
+
+.list-actions>>>.el-tag {
+  height: 24px;
+  line-height: 22px;
+  padding: 0 6px;
+}
+
+.clear-all-btn {
+  margin-left: 8px;
+}
+
+.material-code {
+  font-family: 'Courier New', monospace;
+  font-weight: bold;
+  color: #409EFF;
+}
+
+.location-info {
+  color: #606266;
+  font-weight: normal;
+}
+
+.debug-info {
+  background: #f5f7fa;
+  padding: 8px;
+  border-radius: 4px;
+  margin-top: 8px;
+  font-size: 11px;
+  color: #909399;
+}
+
+.small-button {
+  padding: 6px 8px;
+  font-size: 11px;
+}
+
+/* 杈撳叆妗嗙粍鏍峰紡璋冩暣 */
+.custom-input-group {
+  display: flex;
+  align-items: center;
+  width: 100%;
+  margin: 8px 0;
+  border: 1px solid #DCDFE6;
+  border-radius: 4px;
+  overflow: hidden;
+  background: #fff;
+}
+
+.input-label {
+  padding: 0 12px;
+  background: #F5F7FA;
+  border-right: 1px solid #DCDFE6;
+  color: #606266;
+  font-size: 13px;
+  white-space: nowrap;
+  height: 36px;
+  line-height: 36px;
+  flex-shrink: 0;
+  min-width: 70px;
+  text-align: center;
+}
+
+.input-container {
+  display: flex;
+  flex: 1;
+  align-items: center;
+}
+
+.custom-input {
+  flex: 1;
+}
+
+.custom-input>>>.el-input__inner {
+  border: none;
+  border-radius: 0;
+  height: 36px;
+  line-height: 36px;
+  font-size: 13px;
+}
+
+/* 鍝嶅簲寮忚皟鏁� */
+@media (max-width: 768px) {
+  .barcode-scanner-container {
+    padding: 5px;
+  }
+
+  .custom-input-group {
+    flex-direction: column;
+    border: none;
+  }
+
+  .input-label {
+    width: 100%;
+    border-right: none;
+    border-bottom: 1px solid #DCDFE6;
+    margin-bottom: 5px;
+  }
+
+  .input-container {
+    width: 100%;
+    border: 1px solid #DCDFE6;
+    border-radius: 4px;
+  }
+
+  .unpallet-section.compact {
+    margin-bottom: 8px;
+    flex-shrink: 0;
+  }
+
+  .unpallet-card {
+    flex-shrink: 0;
+  }
+
+  .unpallet-barcode-list {
+    display: flex;
+    flex-wrap: wrap;
+    gap: 6px;
+    padding: 8px 0;
+    max-height: 180px;
+    overflow-y: auto;
+  }
+
+  .unpallet-barcode-list>>>.el-tag {
+    cursor: pointer;
+    max-width: calc(33.333% - 4px);
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+
+  @media (max-width: 768px) {
+    .unpallet-barcode-list>>>.el-tag {
+      max-width: calc(50% - 4px);
+    }
+  }
+}
+</style>
\ No newline at end of file
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/check/recheckOrder.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/check/recheckOrder.js"
index 59e5567..b2c7962 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/check/recheckOrder.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/check/recheckOrder.js"
@@ -1,5 +1,6 @@
 //姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
-import gridBody from './extend/StockSelect.vue'
+import gridBody from './extend/StockSelect.vue';
+import gridFooter from "./extend/ReCheckGroupPallet.vue";
 import http from '@/api/http.js'
 import { h, createVNode, render, reactive, ref } from 'vue';
 import { ElDialog, ElForm, ElFormItem, ElInput, ElButton, ElMessage, ElSelect, ElOption } from 'element-plus'; // 寮曞叆ElMessage锛岃В鍐虫彁绀烘棤鍙嶅簲
@@ -8,7 +9,7 @@
     //鏌ヨ鐣岄潰鎵╁睍缁勪欢
     gridHeader: '',
     gridBody: gridBody,
-    gridFooter: '',
+    gridFooter: gridFooter,
     //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
     modelHeader: '',
     modelBody: '',
@@ -48,31 +49,14 @@
   methods: {
     //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
     onInit() {  //妗嗘灦鍒濆鍖栭厤缃墠锛�
-
-      let EmptyTrayOutboundBtn = this.buttons.find(x => x.value == 'BatchOrder');
-      if (EmptyTrayOutboundBtn) {
-        EmptyTrayOutboundBtn.onClick = function () {
-          let rows = this.$refs.table.getSelected();
-          if (rows.length == 0) return this.$error("璇烽�夋嫨鏁版嵁!");
-          if (rows.length > 1) return this.$error("璇烽�夋嫨涓�鏉℃暟鎹�!");
-          this.$router.push({
-            path: '/outbound/picking',
-            query: { orderId: rows[0].id,orderNo:rows[0].orderNo}
-          })
-
-        }
-      }
-
-      let GroupPalletBtn = this.buttons.find(x=>x.value =='GroupPallet')
-      if(GroupPalletBtn){
-        GroupPalletBtn.onClick = function(){
-          let rows  = this.$refs.table.getSelected();
-          if(rows.length ==0 || rows.length>1) return ElMessage.warning('璇烽�夋嫨涓�鏉″崟鎹�');
-          const targetRow = rows[0];
-
-          this.$emit('openPalletDialog', targetRow.orderNo);
-        }
-      }
+      let ReCheckGroupPalletBtn = this.buttons.find(x => x.value === 'ReCheckGroupPallet');
+            if (ReCheckGroupPalletBtn) {
+              // 閲嶅啓鎸夐挳鐐瑰嚮浜嬩欢
+              ReCheckGroupPalletBtn.onClick = function () {
+      
+                this.$refs.gridFooter.open();
+              };
+            }
     },
     onInited() {
       //妗嗘灦鍒濆鍖栭厤缃悗
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_BasicService/MESOperation/FeedbackMesService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_BasicService/MESOperation/FeedbackMesService.cs"
index fc049c4..f5217a3 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_BasicService/MESOperation/FeedbackMesService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_BasicService/MESOperation/FeedbackMesService.cs"
@@ -98,7 +98,23 @@
 
                     if (returnDTO.Details.Count <= 0)
                     {
+                        if (returnRecords.Count() == returnRecords.Count(x => x.ReturnStatus == 1))
+                        {
+                            outboundOrder.ReturnToMESStatus = 1;
+                        }
+                        else if (returnRecords.Count(x => x.ReturnStatus == 2) > 0)
+                        {
+                            outboundOrder.ReturnToMESStatus = 4;
+                        }
+                        else if (returnRecords.Count() == returnRecords.Count(x => x.ReturnStatus == 2))
+                        {
+                            outboundOrder.ReturnToMESStatus = 2;
+                        }
+                        _outboundOrderRepository.UpdateData(outboundOrder);
+
+
                         return webResponse = WebResponseContent.Instance.OK($"璇ュ崟鎹病鏈夐渶瑕佸洖浼犳槑缁嗭紝澶辫触鏁版嵁鍥炰紶{returnRecords.Count()}鏉★紝鍥炰紶鎴愬姛{returnRecords.Count(x=>x.ReturnStatus == 1)}鏉★紝鍥炰紶澶辫触{returnRecords.Count(x => x.ReturnStatus == 2)}鏉�");
+
                     }
 
                     string apiUrl = AppSettings.GetValue("MaterialOutboundFeedbackUrl");
@@ -129,6 +145,21 @@
 
                     if (returnDTO.Details.Count <= 0)
                     {
+                        if(returnRecords.Count() == returnRecords.Count(x => x.ReturnStatus == 1))
+                        {
+                            outboundOrder.ReturnToMESStatus = 1;
+                        }
+                        else if(returnRecords.Count(x => x.ReturnStatus == 2)>0)
+                        {
+                            outboundOrder.ReturnToMESStatus = 4;
+                        }
+                        else if (returnRecords.Count() == returnRecords.Count(x => x.ReturnStatus == 2))
+                        {
+                            outboundOrder.ReturnToMESStatus = 2;
+                        }
+                        _outboundOrderRepository.UpdateData(outboundOrder);
+                        
+                        
                         return webResponse = WebResponseContent.Instance.OK($"璇ュ崟鎹病鏈夐渶瑕佸洖浼犳槑缁嗭紝澶辫触鏁版嵁鍥炰紶{returnRecords.Count()}鏉★紝鍥炰紶鎴愬姛{returnRecords.Count(x => x.ReturnStatus == 1)}鏉★紝鍥炰紶澶辫触{returnRecords.Count(x => x.ReturnStatus == 2)}鏉�");
                     }
 
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_CheckService/ReCheckOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_CheckService/ReCheckOrderService.cs"
index e1b4692..79dd57a 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_CheckService/ReCheckOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_CheckService/ReCheckOrderService.cs"
@@ -8,6 +8,7 @@
 using System.Text;
 using System.Threading.Tasks;
 using WIDESEA_Common.OrderEnum;
+using WIDESEA_Common.StockEnum;
 using WIDESEA_Core;
 using WIDESEA_Core.BaseRepository;
 using WIDESEA_Core.BaseServices;
@@ -18,6 +19,7 @@
 using WIDESEA_ICheckService;
 using WIDESEA_IOutboundService;
 using WIDESEA_Model.Models;
+using WIDESEA_Model.Models.Basic;
 using WIDESEA_Model.Models.Check;
 
 namespace WIDESEA_CheckService
@@ -75,6 +77,18 @@
                 model.Creater = "MES";
                 model.CreateDate = DateTime.Now;
                 model.MaterielName = materielInfo?.MaterielName ?? "";
+                var stockDetailIds = BaseDal.Db.Queryable<Dt_StockInfoDetail>()
+                .Where(x => x.MaterielCode == model.MaterielCode && x.BatchNo == model.BatchNo && x.ValidDate !=null)
+                .Select(x => x.Id)
+                .ToList();
+
+                if (stockDetailIds.Count > 0)
+                {
+                    BaseDal.Db.Updateable<Dt_StockInfoDetail>()
+                        .SetColumns(x => x.Status == StockStatusEmun.鎵嬪姩鍐荤粨.ObjToInt())
+                        .Where(x => stockDetailIds.Contains(x.Id))
+                        .ExecuteCommand();
+                }
                 BaseDal.AddData(model);
                 var outboundOrders = ConvertToOutboundOrders(model);
              
@@ -102,6 +116,45 @@
                 {
                     isupdate = true;    
                 }
+                if (model.Result != 0 && recheckOrder.SignSeq != model.SignSeq)
+                {
+                    var stockDetailIds = BaseDal.Db.Queryable<Dt_StockInfoDetail>()
+                    .Where(x => x.MaterielCode == model.MaterielCode && x.BatchNo == model.BatchNo && x.ValidDate != null)
+                    .Select(x => x.Id)
+                    .ToList();
+
+                    if (stockDetailIds.Count > 0)
+                    {
+                        var datevaliDate = BaseDal.Db.Queryable<Dt_MaterialExpirationDate>().Where(x => x.MaterialCode.Contains(model.MaterielCode.Substring(0, 6))).First();
+
+                        BaseDal.Db.Updateable<Dt_StockInfoDetail>()
+                            .SetColumns(x => x.Status == StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt())
+                            .Where(x => stockDetailIds.Contains(x.Id))
+                            .ExecuteCommand();
+
+                        if (model.InspectionNumber == 1)
+                        {
+                            BaseDal.Db.Updateable<Dt_StockInfoDetail>()
+                            .SetColumns(x => x.ValidDate == Convert.ToDateTime(x.ValidDate).AddDays(Convert.ToDouble(datevaliDate.OneExtensionDays)))
+                            .Where(x => stockDetailIds.Contains(x.Id))
+                            .ExecuteCommand();
+                        }
+                        else if (model.InspectionNumber == 2)
+                        {
+                            BaseDal.Db.Updateable<Dt_StockInfoDetail>()
+                            .SetColumns(x => x.ValidDate == Convert.ToDateTime(x.ValidDate).AddDays(Convert.ToDouble(datevaliDate.TwoExtensionDays)))
+                            .Where(x => stockDetailIds.Contains(x.Id))
+                            .ExecuteCommand();
+                        }
+                        else
+                        {
+                            BaseDal.Db.Updateable<Dt_StockInfoDetail>()
+                            .SetColumns(x => x.ValidDate == Convert.ToDateTime(x.ValidDate).AddDays(Convert.ToDouble(datevaliDate.ThreeExtensionDays)))
+                            .Where(x => stockDetailIds.Contains(x.Id))
+                            .ExecuteCommand();
+                        }
+                    }
+                }
                 recheckOrder.OrderNo = model.OrderNo;
                 recheckOrder.MaterielCode = model.MaterielCode;
                 recheckOrder.BatchNo = model.BatchNo;
@@ -116,6 +169,7 @@
                 recheckOrder.ModifyDate = DateTime.Now;
                 var materielInfo = _materielInfoService.Db.Queryable<Dt_MaterielInfo>().First(x => model.MaterielCode.Equals(x.MaterielCode));
                 recheckOrder.MaterielName= materielInfo?.MaterielName??"";
+
                 BaseDal.UpdateData(recheckOrder);
 
                 if (isupdate)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundService.cs"
index 3ca1720..2f9faa0 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundService.cs"
@@ -37,6 +37,13 @@
         Task<WebResponseContent> StockTakeGroupPallet(GroupPalletDto palletDto);
 
         /// <summary>
+        /// 閲嶆缁勭洏
+        /// </summary>
+        /// <param name="palletDto"></param>
+        /// <returns></returns>
+        Task<WebResponseContent> ReCheckGroupPallet(GroupPalletDto palletDto);
+
+        /// <summary>
         /// 鍏ュ簱鍒嗘壒鍥炰紶
         /// </summary>
         /// <param name="OrderNo"></param>
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs"
index 4a3c19c..b7b4f4a 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs"
@@ -31,6 +31,7 @@
 using WIDESEA_IStockService;
 using WIDESEA_Model.Models;
 using WIDESEA_Model.Models.Basic;
+using WIDESEA_Model.Models.Check;
 
 namespace WIDESEA_InboundService
 {
@@ -443,6 +444,19 @@
 
                     if (allocatefeedmodel.Details.Count <= 0)
                     {
+                        if (returnRecords.Count() == returnRecords.Count(x => x.ReturnStatus == 1))
+                        {
+                            inboundOrder.ReturnToMESStatus = 1;
+                        }
+                        else if (returnRecords.Count(x => x.ReturnStatus == 2) > 0)
+                        {
+                            inboundOrder.ReturnToMESStatus = 4;
+                        }
+                        else if (returnRecords.Count() == returnRecords.Count(x => x.ReturnStatus == 2))
+                        {
+                            inboundOrder.ReturnToMESStatus = 2;
+                        }
+                        _inboundOrderRepository.UpdateData(inboundOrder);
                         return WebResponseContent.Instance.OK($"璇ュ崟鎹病鏈夐渶瑕佸洖浼犳槑缁嗭紝澶辫触鏁版嵁鍥炰紶{returnRecords.Count()}鏉★紝鍥炰紶鎴愬姛{returnRecords.Count(x => x.ReturnStatus == 1)}鏉★紝鍥炰紶澶辫触{returnRecords.Count(x => x.ReturnStatus == 2)}鏉�");
                     }
 
@@ -477,6 +491,19 @@
 
                     if (feedmodel.details.Count<=0)
                     {
+                        if (returnRecords.Count() == returnRecords.Count(x => x.ReturnStatus == 1))
+                        {
+                            inboundOrder.ReturnToMESStatus = 1;
+                        }
+                        else if (returnRecords.Count(x => x.ReturnStatus == 2) > 0)
+                        {
+                            inboundOrder.ReturnToMESStatus = 4;
+                        }
+                        else if (returnRecords.Count() == returnRecords.Count(x => x.ReturnStatus == 2))
+                        {
+                            inboundOrder.ReturnToMESStatus = 2;
+                        }
+                        _inboundOrderRepository.UpdateData(inboundOrder);
                         return WebResponseContent.Instance.OK($"璇ュ崟鎹病鏈夐渶瑕佸洖浼犳槑缁嗭紝澶辫触鏁版嵁鍥炰紶{returnRecords.Count()}鏉★紝鍥炰紶鎴愬姛{returnRecords.Count(x => x.ReturnStatus == 1)}鏉★紝鍥炰紶澶辫触{returnRecords.Count(x => x.ReturnStatus == 2)}鏉�");
                     }
                     var response = responseModel(inboundOrder, 3, feedmodel);
@@ -716,5 +743,93 @@
                 return content.Error(ex.Message);
             }
         }
+
+        public async Task<WebResponseContent> ReCheckGroupPallet(GroupPalletDto palletDto)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                (bool, string, object?) result2 = ModelValidate.ValidateModelData(palletDto);
+                if (!result2.Item1) return content.Error(result2.Item2);
+
+                var code = _warehouseAreaRepository.Db.Queryable<Dt_WarehouseArea>().Where(x => x.Code == palletDto.WarehouseType).Select(x => x.Code).First();
+                if (string.IsNullOrEmpty(code))
+                {
+                    return content.Error($"浠撳簱涓病鏈夎{palletDto.WarehouseType}缂栧彿銆�");
+                }
+
+                Dt_StockInfo? stockInfo = await _stockInfoRepository.Db.Queryable<Dt_StockInfo>().Includes(x => x.Details).Where(x => x.PalletCode == palletDto.PalletCode).FirstAsync();
+
+                if (_taskRepository.QueryFirst(x => x.PalletCode == palletDto.PalletCode) != null)
+                {
+                    return content.Error($"璇ユ墭鐩樺凡鐢熸垚浠诲姟");
+                }
+                if (stockInfo != null && !string.IsNullOrEmpty(stockInfo.LocationCode) && stockInfo.StockStatus != (int)StockStatusEmun.缁勭洏鏆傚瓨)
+                {
+                    return content.Error("宸蹭笂鏋剁殑鎵樼洏涓嶈兘鍐嶆缁勭洏");
+                }
+
+                if (stockInfo == null)
+                {
+                    stockInfo = new Dt_StockInfo() { PalletType = (int)PalletTypeEnum.None, LocationType = Convert.ToInt32(palletDto.locationType) };
+                    stockInfo.Details = new List<Dt_StockInfoDetail>();
+                }
+
+                if (stockInfo != null && stockInfo.Details.Count > 0 && stockInfo.Details.FirstOrDefault()?.WarehouseCode != palletDto.WarehouseType)
+                {
+                    return content.Error($"璇ユ墭鐩樼粍鐩樹粨搴撲负{stockInfo.Details.FirstOrDefault()?.WarehouseCode}涓庡綋鍓嶄粨搴搟palletDto.WarehouseType}涓嶄竴鑷达紝涓嶅厑璁哥粍鐩�");
+                }
+                Dt_StockInfoDetail stockInfoDetail = _stockInfoRepository.Db.Queryable<Dt_StockInfoDetail>().Where(x => x.Barcode == palletDto.Barcode && x.Status == StockStatusEmun.鎵嬪姩鍐荤粨.ObjToInt()).First();
+                if(stockInfoDetail == null)
+                {
+                    return content.Error("鏈壘鍒板簱瀛樹腑閲嶆鍐荤粨鐨勬潯鐮�");
+                }
+                Dt_ReCheckOrder reCheckOrder = _stockInfoRepository.Db.Queryable<Dt_ReCheckOrder>().Where(x => x.MaterielCode == stockInfoDetail.MaterielCode && x.BatchNo == stockInfoDetail.BatchNo && x.Result == 0).First();
+                if(reCheckOrder != null)
+                {
+                    return content.Error($"璇ラ噸妫�鏉$爜鐨勬壒娆″湪閲嶆鍗曚腑鏈嬁鍒伴噸妫�缁撴灉锛岃妫�娴嬮噸妫�鍗晎reCheckOrder.OrderNo}鐘舵��");
+                }
+                stockInfo.Details.Add(new Dt_StockInfoDetail
+                {
+                    StockId = stockInfo == null ? 0 : stockInfo.Id,
+                    Barcode = stockInfoDetail.Barcode,
+                    MaterielCode = stockInfoDetail.MaterielCode,
+                    MaterielName = stockInfoDetail.MaterielName,
+                    BatchNo = stockInfoDetail.BatchNo,
+                    Unit = stockInfoDetail.Unit,
+                    SupplyCode = stockInfoDetail.SupplyCode,
+                    WarehouseCode = stockInfoDetail.WarehouseCode,
+                    StockQuantity = stockInfoDetail.StockQuantity,
+                    BarcodeQty = stockInfoDetail.BarcodeQty,
+                    BarcodeUnit = stockInfoDetail.BarcodeUnit,
+                    FactoryArea = stockInfoDetail.FactoryArea,
+                    Status = stockInfoDetail.Status,
+                    OrderNo = stockInfoDetail.OrderNo,
+                    BusinessType = "30",
+                    ValidDate = stockInfoDetail.ValidDate
+                });
+                _stockInfoRepository.Db.Deleteable<Dt_StockInfoDetail>().Where(x => x.Barcode == stockInfoDetail.Barcode).ExecuteCommand();
+                if (stockInfo.Id == 0)
+                {
+                    stockInfo.PalletCode = palletDto.PalletCode;
+                    stockInfo.StockStatus = (int)StockStatusEmun.閫佹搴撳瓨瀹屾垚;
+                }
+                stockInfo.PalletType = (int)PalletTypeEnum.None;
+                _unitOfWorkManage.BeginTran();
+                _stockService.StockInfoService.AddMaterielGroup(stockInfo);
+                _unitOfWorkManage.CommitTran();
+
+                Dt_StockInfo? NewstockInfo = await _stockInfoRepository.Db.Queryable<Dt_StockInfo>().Includes(x => x.Details).Where(x => x.PalletCode == palletDto.PalletCode).FirstAsync();
+
+                return WebResponseContent.Instance.OK(data: NewstockInfo.Details.OrderByDescending(x => x.Id));
+
+            }
+            catch (Exception ex)
+            {
+                _unitOfWorkManage.RollbackTran();
+                LogFactory.GetLog($"缁勭洏淇℃伅").Info(true, $"銆愬紓甯搞�戯細銆恵ex.Message}銆憑Environment.NewLine}銆恵ex.StackTrace}銆憑Environment.NewLine}{Environment.NewLine}");
+                return content.Error(ex.Message);
+            }
+        }
     }
 }
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/TakeStockOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/TakeStockOrderService.cs"
index c49a425..138206c 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/TakeStockOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/TakeStockOrderService.cs"
@@ -399,83 +399,6 @@
                 {
                     return WebResponseContent.Instance.Error("鏈壘鍒拌鐩樼偣宸紓鏁版嵁");
                 }
-                //if(takeStockOrderDetail.Remark == "鐩樼泩")
-                //{
-                //    Dt_InboundOrderDetail inboundOrderDetail = _inboundOrderDetailRepository.QueryFirst(x => x.Id == orderId);
-                //    if(inboundOrderDetail == null)
-                //    {
-                //        return WebResponseContent.Instance.Error("鏈壘鍒伴�夋嫨鐨勬潅鏀跺钩璐﹀崟鎹�");
-                //    }
-                //    Dt_InboundOrder inboundOrder = _inboundOrderRepository.Db.Queryable<Dt_InboundOrder>().Where(x=>x.Id == inboundOrderDetail.OrderId).Includes(x=>x.Details).First();
-                //    Dt_StockInfo  stockInfo = _stockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x=>x.PalletCode == takeStockOrderDetail.TakePalletCode && x.StockStatus == StockStatusEmun.鐩樼偣搴撳瓨瀹屾垚.ObjToInt()).Includes(x=>x.Details).First();
-                //    if(stockInfo== null)
-                //    {
-                //        return WebResponseContent.Instance.Error($"鐩樼偣鎵樼洏{takeStockOrderDetail.TakePalletCode}鐨勫簱瀛樹俊鎭湭鎵惧埌锛屾垨鎵樼洏鐘舵�佷笉姝g‘");
-                //    }
-                //    var datevaliDate = _inboundOrderRepository.Db.Queryable<Dt_MaterialExpirationDate>().Where(x => x.MaterialCode.Contains(inboundOrderDetail.MaterielCode.Substring(0, 6))).First();
-                //    var newStockDetail = new Dt_StockInfoDetail
-                //    {
-                //        StockId = stockInfo == null ? 0 : stockInfo.Id,
-                //        Barcode = inboundOrderDetail.Barcode,
-                //        MaterielCode = inboundOrderDetail.MaterielCode,
-                //        MaterielName = inboundOrderDetail.MaterielName,
-                //        BatchNo = inboundOrderDetail.BatchNo,
-                //        Unit = inboundOrderDetail.Unit,
-                //        InboundOrderRowNo = inboundOrderDetail.lineNo,
-                //        SupplyCode = inboundOrderDetail.SupplyCode,
-                //        WarehouseCode = inboundOrderDetail.WarehouseCode,
-                //        StockQuantity = inboundOrderDetail.OrderQuantity,
-                //        BarcodeQty = inboundOrderDetail.BarcodeQty,
-                //        BarcodeUnit = inboundOrderDetail.BarcodeUnit,
-                //        FactoryArea = inboundOrder.FactoryArea,
-                //        Status = 0,
-                //        OrderNo = inboundOrder.InboundOrderNo,
-                //        BusinessType = inboundOrder.BusinessType,
-                //        ValidDate = inboundOrder.BusinessType == BusinessTypeEnum.澶栭儴浠撳簱璋冩櫤浠�.ToString() ? inboundOrderDetail.ValidDate : datevaliDate == null ? null : Convert.ToDateTime(DateTime.Now).AddDays(Convert.ToDouble(datevaliDate.ValidityDays)),
-                //    };
-                //    stockInfo.Details.Add(newStockDetail);
-
-                //    inboundOrderDetail.ReceiptQuantity = inboundOrderDetail.OrderQuantity;
-                //    inboundOrderDetail.OverInQuantity = inboundOrderDetail.OrderQuantity;
-                //    inboundOrderDetail.OrderDetailStatus = OrderDetailStatusEnum.Over.ObjToInt();
-                //    int overCount = 1;
-                //    int moreOverCount = inboundOrder.Details.Count(x => x.OrderDetailStatus == OrderDetailStatusEnum.Over.ObjToInt());
-                //    if (inboundOrder.Details.Count() == overCount + moreOverCount)
-                //    {
-                //        inboundOrder.OrderStatus = InOrderStatusEnum.鍏ュ簱瀹屾垚.ObjToInt();
-                //    }
-                //    else
-                //    {
-                //        inboundOrder.OrderStatus = InOrderStatusEnum.鍏ュ簱涓�.ObjToInt();
-                //    }
-                //    takeStockOrderDetail.DifferenceQty -= inboundOrderDetail.OrderQuantity;
-                //    if(takeStockOrderDetail.DifferenceQty > 0)
-                //    {
-                //        takeStockOrderDetail.TakeDetalStatus = TakeStockDetailStatusEnum.鏉傛敹鏉傚彂骞宠处澶勭悊涓�.ObjToInt();
-                //    }
-                //    else if (takeStockOrderDetail.DifferenceQty == 0)
-                //    {
-                //        takeStockOrderDetail.TakeDetalStatus = TakeStockDetailStatusEnum.鏉傛敹鏉傚彂骞宠处澶勭悊.ObjToInt();
-                //    }
-                //    else
-                //    {
-                //        return WebResponseContent.Instance.Error("璇ユ潅鏀跺崟鎹槑缁嗘潯鐮佹暟閲忓ぇ浜庡緟骞宠处鏁伴噺锛岃鍙﹂�夊叾浠栧崟鎹钩璐�");
-                //    }
-
-                //    _unitOfWorkManage.BeginTran();
-                //    _inboundOrderRepository.UpdateData(inboundOrder);
-                //    _inboundOrderDetailRepository.UpdateData(inboundOrderDetail);
-                //    _takeStockOrderDetail.UpdateData(takeStockOrderDetail);
-                //    BaseDal.Db.Insertable(newStockDetail).ExecuteCommand();
-                //    _unitOfWorkManage.CommitTran();
-                //    List<string> barcodes = new List<string>();
-                //    barcodes.Add(inboundOrderDetail.Barcode);
-                //    _outboundPickingService.NoStockOutBatchInOrderFeedbackToMes(inboundOrder.Id, barcodes);
-
-
-                //}
-                //else
-                //{
                 Dt_OutboundOrderDetail outboundOrderDetail = _outboundOrderDetailRepository.QueryFirst(x => x.Remark == takeStockOrderDetail.TakeStockNo && (x.OrderQuantity-x.LockQuantity-x.MoveQty)>0);
                 if (outboundOrderDetail == null)
                 {
@@ -711,10 +634,11 @@
                     List<Dt_OutboundOrderDetail> details = _outboundOrderDetailRepository.QueryData(x => x.OrderId == outboundOrder.Id);
                     if(details.All(x => x.OverOutQuantity >= x.OrderQuantity - x.MoveQty))
                     {
+                        _feedbackMesService.OutboundFeedback(outboundOrder.OrderNo);
                         outboundOrder.OrderStatus = OutOrderStatusEnum.鍑哄簱瀹屾垚.ObjToInt();
                         _outboundOrderRepository.UpdateData(outboundOrder);
                     }
-                    _feedbackMesService.OutboundFeedback(outboundOrder.OrderNo);
+                    
 
                 }
                 catch (Exception ex)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
index 253ad0d..13dbfe3 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
@@ -193,10 +193,16 @@
                     UpdateStockStatus(pickedDetails.Select(x => x.PalletCode).ToList(), StockStatusEmun.鍑哄簱閿佸畾.ObjToInt());
                     UpdateLocationStatus(pickedDetails.Select(x => x.LocationCode).ToList(), LocationStatusEnum.Lock.ObjToInt());
                 }
-                UpdateOutStockLockInfo(outStockLockInfos);
+                //閲嶆鍗曚笉鎷i�夛紝鍘绘帀閿佸畾璁板綍鍥炲簱锛屽啀娆$粍鐩樻椂鎵i櫎鍘熸潯鐮�
+                if (outboundOrder.OrderType != InOrderTypeEnum.ReCheck.ObjToInt())
+                {
+                    UpdateOutStockLockInfo(outStockLockInfos);
+                }
+                
                 if (tasks.Any()) _taskRepository.AddData(tasks);
 
-                _unitOfWorkManage.CommitTran();
+                
+                    _unitOfWorkManage.CommitTran();
 
                 // 4. 鏋勯�犲搷搴旓細鍖哄垎銆屽叏閮ㄥ垎閰嶃�嶅拰銆岄儴鍒嗗垎閰嶃��
                 string responseMsg = totalActualAllocate == totalNeedAllocate
@@ -484,7 +490,7 @@
                 x => request.StockDetailIds.Contains(x.Id)
                 && x.MaterielCode == materielCalc.MaterielCode
                 && x.StockQuantity > 0
-                && (x.Status == (int)StockStatusEmun.鍏ュ簱瀹屾垚 || x.Status == (int)StockStatusEmun.鎵嬪姩瑙i攣));
+                && (x.Status == (int)StockStatusEmun.鍏ュ簱瀹屾垚 || x.Status == (int)StockStatusEmun.鎵嬪姩鍐荤粨)|| x.Status == (int)StockStatusEmun.鎵嬪姩瑙i攣);
 
             if (!specifiedStockDetails.Any())
             {
@@ -670,15 +676,13 @@
                     decimal totalAllocatedQuantity = CalcTotalAllocatedQuantity(lockInfos, stockInfo.Id, detail.MaterielCode);
                     lockInfo.AssignQuantity += actualAllocatedQuantity;
                     lockInfo.AllocatedQuantity = totalAllocatedQuantity;
-                    // 瀛橀噺閿佸畾璁板綍涔熸洿鏂癘riginalQuantity涓烘墭鐩樻�诲簱瀛橈紙鍙�夛紝淇濇寔鏁版嵁涓�鑷达級
                     if (palletMaterielTotalStock > 0)
                         lockInfo.OriginalQuantity = palletMaterielTotalStock;
                     lockInfoList.Add(lockInfo);
                 }
                 else
                 {
-                    // ===== 鏍稿績浼樺寲2锛歄riginalQuantity璧嬪�间负鎵樼洏鐗╂枡鎬诲簱瀛� =====
-                    decimal originalQuantity = palletMaterielTotalStock; // 鏇夸唬鍘熸湁灞�閮ㄦ槑缁嗘暟閲�
+                    decimal originalQuantity = palletMaterielTotalStock;
 
                     List<string> allDetailIds = outboundOrder.Details.Where(x =>
                         x.OrderId == outboundOrder.Id && x.MaterielCode == detail.MaterielCode
@@ -978,7 +982,7 @@
                     // 鏁寸鍑哄簱鏃犻渶鎷嗗寘
                     PerformFullOutboundOperation(stockInfo, request, lockInfo.TaskNum.GetValueOrDefault());
 
-                    if (outboundOrder.OrderType != 0)
+                    if (outboundOrder.OrderType == InOrderTypeEnum.InternalAllocat.ObjToInt())
                     {
                         Dt_AllocateOrder allocateOrder = _allocateOrderRepository.QueryFirst(x => x.OrderNo == outboundOrder.OrderNo);
                         if (allocateOrder != null)
@@ -1004,6 +1008,29 @@
                             }
                             _allocateMaterialInfoRepository.AddData(allocateMaterialInfos);
                         }
+                    }
+                    else if(outboundOrder.OrderType == InOrderTypeEnum.ReCheck.ObjToInt())
+                    {
+                        List<Dt_AllocateMaterialInfo> allocateMaterialInfos = new List<Dt_AllocateMaterialInfo>();
+                        foreach (var item in stockInfo.Details)
+                        {
+                            Dt_AllocateMaterialInfo allocateMaterialInfo = new Dt_AllocateMaterialInfo()
+                            {
+                                Barcode = item.Barcode??"",
+                                BatchNo = item.BatchNo,
+                                FactoryArea = item.FactoryArea,
+                                MaterialCode = item.MaterielCode,
+                                MaterialName = item.MaterielName,
+                                OrderId = outboundOrder.Id,
+                                OrderNo = outboundOrder.OrderNo,
+                                Quantity = item.StockQuantity,
+                                SupplyCode = item.SupplyCode??"",
+                                Unit = item.Unit,
+                                WarehouseCode = item.WarehouseCode??""
+                            };
+                            allocateMaterialInfos.Add(allocateMaterialInfo);
+                        }
+                        _allocateMaterialInfoRepository.AddData(allocateMaterialInfos);
                     }
 
                     decimal allocatedQuantity = actualOutboundQuantity;
@@ -1364,7 +1391,7 @@
 
                         MaterialCodeReturnDTO returnDTO = returnDTOs.First(x => x.Barcode == newBarcode);
 
-                        if (outboundOrder.OrderType != 0)
+                        if (outboundOrder.OrderType == InOrderTypeEnum.ReCheck.ObjToInt()||outboundOrder.OrderType == InOrderTypeEnum.InternalAllocat.ObjToInt())
                         {
                             allocateMaterialInfo = new Dt_AllocateMaterialInfo()
                             {
@@ -1386,7 +1413,7 @@
                     {
                         PerformFullOutboundOperation(stockDetail, stockInfo, actualOutboundQuantity, request, beforeQuantity, lockInfo.TaskNum.GetValueOrDefault());
 
-                        if (outboundOrder.OrderType != 0)
+                        if (outboundOrder.OrderType == InOrderTypeEnum.ReCheck.ObjToInt() || outboundOrder.OrderType == InOrderTypeEnum.InternalAllocat.ObjToInt())
                         {
                             allocateMaterialInfo = new Dt_AllocateMaterialInfo()
                             {
@@ -1405,8 +1432,8 @@
 
                     }
 
-                    // 鍒ゆ柇鏄惁鏄皟鎷ㄥ崟
-                    if (outboundOrder.OrderType != 0)
+                    // 鍒ゆ柇鏄惁鏄櫤浠撹皟鏅轰粨鍗�
+                    if ( outboundOrder.OrderType == InOrderTypeEnum.InternalAllocat.ObjToInt())
                     {
                         Dt_AllocateOrder allocateOrder = _allocateOrderRepository.QueryFirst(x => x.OrderNo == outboundOrder.OrderNo);
                         if (allocateOrder != null)
@@ -1523,7 +1550,6 @@
                         _feedbackMesService.BarcodeFeedback(newBarcode);
                     }
 
-                    // 鍒犻櫎閿佸畾璁板綍锛堝鏋滃嚭搴撴槑缁嗗叏閮ㄥ畬鎴愶級 涓嶤alculateActualOutboundQuantity鏂规硶閲岄潰娉ㄩ噴浠g爜2閫�1浣跨敤
                     if (CheckOutboundOrderDetailCompletedByMatCode(request.OrderNo, lockInfo.MaterielCode, outboundOrderDetails.First()))
                     {
                         Func<Dt_OutStockLockInfo, bool> supWhere = x => string.IsNullOrEmpty(outboundOrderDetails.First().SupplyCode) ? true : x.SupplyCode == outboundOrderDetails.First().SupplyCode;
@@ -1538,6 +1564,7 @@
                             _outboundLockInfoRepository.DeleteAndMoveIntoHty(stockLockInfos, WIDESEA_Core.Enums.OperateTypeEnum.鑷姩鍒犻櫎);
                         }
                     }
+                    
 
                     // 妫�鏌ュ嚭搴撳崟鏄惁瀹屾垚
                     if (CheckOutboundOrderCompleted(request.OrderNo))
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs"
index 452d411..4e15598 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs"
@@ -492,7 +492,7 @@
                 // 鏋勫缓鏌ヨ鏉′欢
                 var stockQuery = Db.Queryable<Dt_StockInfo>()
                     .Where(x => locationCodes.Contains(x.LocationCode))
-                    .Where(x => x.StockStatus == (int)StockStatusEmun.鍏ュ簱瀹屾垚 || x.StockStatus == (int)StockStatusEmun.杩囨湡)
+                    .Where(x => x.StockStatus == (int)StockStatusEmun.鍏ュ簱瀹屾垚)
                     .Includes(x => x.Details);
 
                 // 鎵ц鏌ヨ骞舵寜鍏堣繘鍏堝嚭鎺掑簭
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
index 5e89b8c..2a47bdd 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
@@ -282,6 +282,23 @@
                     _inboundOrderService.UpdateData(inboundOrder);
                 }
             }
+            Dt_OutboundOrder outboundOrder = _outboundOrderService.Db.Queryable<Dt_OutboundOrder>().Where(x => x.OrderNo == stockInfo.Details.FirstOrDefault().OrderNo).Includes(x => x.Details).First();
+
+            if (outboundOrder != null)
+            {
+                foreach (var item in stockInfo.Details.Where(x => x.OrderNo == outboundOrder.OrderNo).ToList())
+                {
+                    var inbounddetail = _allocateMaterialInfo.QueryFirst(x => x.OrderNo == item.OrderNo && x.Barcode == item.Barcode);
+                    if (inbounddetail != null)
+                    {
+                        var alldelete = _allocateMaterialInfo.DeleteAndMoveIntoHty(inbounddetail, OperateTypeEnum.鑷姩鍒犻櫎);
+                        if (!alldelete)
+                        {
+                            await Db.Deleteable(task).ExecuteCommandAsync();
+                        }
+                    }
+                }
+            }
             stockInfo.LocationCode = task.TargetAddress;
             stockInfo.StockStatus = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt();
             stockInfo.Details.ForEach(x =>
@@ -345,8 +362,9 @@
                                 Details = new List<AllocateDtoDetail>()
 
                             };
-
-                            var groupedData = inboundOrder.Details.GroupBy(item => new { item.MaterielCode, item.lineNo, item.BarcodeUnit, item.WarehouseCode })
+                            var query = inboundOrder.Details.AsQueryable();
+                            query = query.Where(item => item.ReturnToMESStatus == 0);
+                            var groupedData = query.GroupBy(item => new { item.MaterielCode, item.lineNo, item.BarcodeUnit, item.WarehouseCode })
                                .Select(group => new AllocateDtoDetail
                                {
                                    MaterialCode = group.Key.MaterielCode,
@@ -403,8 +421,9 @@
                                 Details = new List<AllocateDtoDetail>()
 
                             };
-
-                            var groupedData = inboundOrder.Details.GroupBy(item => new { item.MaterielCode, item.lineNo, item.BarcodeUnit, item.WarehouseCode })
+                            var query = inboundOrder.Details.AsQueryable();
+                            query = query.Where(item => item.ReturnToMESStatus == 0);
+                            var groupedData = query.GroupBy(item => new { item.MaterielCode, item.lineNo, item.BarcodeUnit, item.WarehouseCode })
                                .Select(group => new AllocateDtoDetail
                                {
                                    MaterialCode = group.Key.MaterielCode,
@@ -452,8 +471,9 @@
                                 details = new List<FeedbackInboundDetailsModel>()
 
                             };
-
-                            var groupedData = inboundOrder.Details.GroupBy(item => new { item.MaterielCode, item.SupplyCode, item.BatchNo, item.lineNo, item.BarcodeUnit, item.WarehouseCode })
+                            var query = inboundOrder.Details.AsQueryable();
+                            query = query.Where(item => item.ReturnToMESStatus == 0);
+                            var groupedData = query.GroupBy(item => new { item.MaterielCode, item.SupplyCode, item.BatchNo, item.lineNo, item.BarcodeUnit, item.WarehouseCode })
                                .Select(group => new FeedbackInboundDetailsModel
                                {
                                    materialCode = group.Key.MaterielCode,
@@ -588,7 +608,11 @@
 
             stock.Details.ForEach(x =>
             {
-                x.Status = StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt();
+                if (x.Status != StockStatusEmun.鎵嬪姩鍐荤粨.ObjToInt()) 
+                {
+                    x.Status = StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt();
+                }
+                
             });
 
             _stockService.StockInfoService.Db.UpdateNav(stock).IncludesAllFirstLayer().ExecuteCommand();
@@ -737,15 +761,19 @@
                     await Db.Deleteable(task).ExecuteCommandAsync();
                 }
                 Dt_OutboundOrder outboundOrder = _outboundOrderService.Db.Queryable<Dt_OutboundOrder>().Where(x => x.OrderNo == stockInfo.Details.FirstOrDefault().OrderNo).Includes(x=>x.Details).First();
-                foreach (var item in stockInfo.Details.Where(x => x.OrderNo == outboundOrder.OrderNo).ToList())
+
+                if(outboundOrder != null)
                 {
-                    var inbounddetail = _allocateMaterialInfo.QueryFirst(x => x.OrderNo == item.OrderNo && x.Barcode == item.Barcode);
-                    if (inbounddetail != null)
+                    foreach (var item in stockInfo.Details.Where(x => x.OrderNo == outboundOrder.OrderNo).ToList())
                     {
-                        var alldelete = _allocateMaterialInfo.DeleteAndMoveIntoHty(inbounddetail, OperateTypeEnum.鑷姩鍒犻櫎);
-                        if (!alldelete)
+                        var inbounddetail = _allocateMaterialInfo.QueryFirst(x => x.OrderNo == item.OrderNo && x.Barcode == item.Barcode);
+                        if (inbounddetail != null)
                         {
-                            await Db.Deleteable(task).ExecuteCommandAsync();
+                            var alldelete = _allocateMaterialInfo.DeleteAndMoveIntoHty(inbounddetail, OperateTypeEnum.鑷姩鍒犻櫎);
+                            if (!alldelete)
+                            {
+                                await Db.Deleteable(task).ExecuteCommandAsync();
+                            }
                         }
                     }
                 }
@@ -976,7 +1004,10 @@
                 {
                     foreach (var detail in stockInfo.Details)
                     {
-                        detail.Status = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt();
+                        if(detail.Status != StockStatusEmun.鎵嬪姩鍐荤粨.ObjToInt())
+                        {
+                            detail.Status = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt();
+                        }
                         detail.OutboundQuantity = 0;
                     }
                     _stockService.StockInfoDetailService.Repository.UpdateData(stockInfo.Details);
@@ -1980,6 +2011,101 @@
                 return await Task.FromResult(WebResponseContent.Instance.Error(ex.Message));
             }
         }
+
+        /// <summary>
+        /// 閲嶆鍏ュ簱瀹屾垚
+        /// </summary>
+        /// <param name="task"></param>
+        /// <returns></returns>
+        public async Task<WebResponseContent> InQualityTaskCompleted(Dt_Task task)
+        {
+
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+
+                Dt_StockInfo stockInfo = await _stockRepository.Db.Queryable<Dt_StockInfo>()
+                    .Includes(x => x.Details)
+                    .Where(x => x.PalletCode == task.PalletCode)
+                    .FirstAsync();
+
+                if (stockInfo == null)
+                {
+                    return WebResponseContent.Instance.Error($"鏈壘鍒版墭鐩樺搴旂殑缁勭洏淇℃伅");
+                }
+
+                if (stockInfo.Details.Count == 0 && stockInfo.PalletType != PalletTypeEnum.Empty.ObjToInt())
+                {
+                    _logger.LogInformation($"TaskService InPickTaskCompleted: 鏈壘鍒拌鎵樼洏搴撳瓨鏄庣粏淇℃伅.{task.TaskNum}");
+                    return WebResponseContent.Instance.Error($"鏈壘鍒拌鎵樼洏搴撳瓨鏄庣粏淇℃伅");
+                }
+                Dt_LocationInfo locationInfo = _locationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress);
+                if (locationInfo == null)
+                {
+                    return content.Error($"鏈壘鍒板搴旂殑缁堢偣璐т綅淇℃伅");
+                }
+
+                if (!string.IsNullOrEmpty(stockInfo.LocationCode))
+                {
+                    return WebResponseContent.Instance.Error($"璇ユ墭鐩樺凡缁戝畾璐т綅");
+                }
+                if (locationInfo.LocationStatus == LocationStatusEnum.InStock.ObjToInt())
+                {
+                    return WebResponseContent.Instance.Error($"璐т綅鐘舵�佷笉姝g‘");
+                }
+
+                _unitOfWorkManage.BeginTran();
+
+                var beforelocationStatus = locationInfo.LocationStatus;
+                locationInfo.LocationStatus = LocationStatusEnum.InStock.ObjToInt();
+                _locationInfoService.Repository.UpdateData(locationInfo);
+
+                stockInfo.LocationCode = locationInfo.LocationCode;
+                stockInfo.PalletCode = task.PalletCode;
+                stockInfo.LocationCode = task.TargetAddress;
+                stockInfo.StockStatus = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt();
+                _stockRepository.UpdateData(stockInfo);
+
+                task.TaskStatus = TaskStatusEnum.Finish.ObjToInt();
+                var result = _task_HtyService.DeleteAndMoveIntoHty(task, OperateTypeEnum.鑷姩瀹屾垚);
+                _unitOfWorkManage.CommitTran();
+                if (!result)
+                {
+                    await Db.Deleteable(task).ExecuteCommandAsync();
+                }
+                Dt_OutboundOrder outboundOrder = _outboundOrderService.Db.Queryable<Dt_OutboundOrder>().Where(x => x.OrderNo == stockInfo.Details.FirstOrDefault().OrderNo).Includes(x => x.Details).First();
+
+                if (outboundOrder != null)
+                {
+                    foreach (var item in stockInfo.Details.Where(x => x.OrderNo == outboundOrder.OrderNo).ToList())
+                    {
+                        var inbounddetail = _allocateMaterialInfo.QueryFirst(x => x.OrderNo == item.OrderNo && x.Barcode == item.Barcode);
+                        if (inbounddetail != null)
+                        {
+                            var alldelete = _allocateMaterialInfo.DeleteAndMoveIntoHty(inbounddetail, OperateTypeEnum.鑷姩鍒犻櫎);
+                            if (!alldelete)
+                            {
+                                await Db.Deleteable(task).ExecuteCommandAsync();
+                            }
+                        }
+                    }
+                }
+                try
+                {
+                    _locationStatusChangeRecordService.AddLocationStatusChangeRecord(locationInfo, beforelocationStatus, StockChangeType.Inbound.ObjToInt(), "", task.TaskNum);
+                }
+                catch (Exception ex)
+                {
+                    _logger.LogInformation($"InEmptyTaskCompleted AddLocationStatusChangeRecord : {ex.Message} ");
+                }
+                return content;
+            }
+            catch (Exception ex)
+            {
+                _unitOfWorkManage.RollbackTran();
+                return await Task.FromResult(WebResponseContent.Instance.Error(ex.Message));
+            }
+        }
     }
 }
 
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
index d521c7f..15db8e1 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
@@ -54,7 +54,7 @@
                     return WebResponseContent.Instance.Error($"鏈壘鍒扮粍鐩樹俊鎭�");
                 }
 
-                if (stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鎷i�夊畬鎴�.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鏅轰粨鍏ユ櫤浠撶粍鐩樻殏瀛�.ObjToInt())
+                if (stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鎷i�夊畬鎴�.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鏅轰粨鍏ユ櫤浠撶粍鐩樻殏瀛�.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.閫佹搴撳瓨瀹屾垚.ObjToInt())
                 {
                     return WebResponseContent.Instance.Error($"璇ユ墭鐩樼姸鎬佷笉姝g‘,涓嶅彲鐢宠鍏ュ簱");
                 }
@@ -85,7 +85,7 @@
                     OrderNo= stockInfo.Details.FirstOrDefault()?.OrderNo,
                 };
                 //绌虹
-                if (stockInfo.PalletType == PalletTypeEnum.Empty.ObjToInt()|| stockInfo.StockStatus == StockStatusEmun.鏅轰粨鍏ユ櫤浠撶粍鐩樻殏瀛�.ObjToInt())
+                if (stockInfo.PalletType == PalletTypeEnum.Empty.ObjToInt()|| stockInfo.StockStatus == StockStatusEmun.鏅轰粨鍏ユ櫤浠撶粍鐩樻殏瀛�.ObjToInt() || stockInfo.StockStatus == StockStatusEmun.閫佹搴撳瓨瀹屾垚.ObjToInt())
                 {
                     _unitOfWorkManage.BeginTran();
                     newTask.TaskType = TaskTypeEnum.InEmpty.ObjToInt();
@@ -94,6 +94,10 @@
                     {
                         newTask.TaskType = TaskTypeEnum.AllocateInWarehouse.ObjToInt();
                     }
+                    if (stockInfo.StockStatus == StockStatusEmun.閫佹搴撳瓨瀹屾垚.ObjToInt())
+                    {
+                        newTask.TaskType = TaskTypeEnum.InQuality.ObjToInt();
+                    }
                     int taskId = BaseDal.AddData(newTask);
                     newTask.TaskId = taskId;
 
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundController.cs"
index 3dfcd07..b68593b 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundController.cs"
@@ -52,6 +52,16 @@
         }
 
         /// <summary>
+        /// 閲嶆缁勭洏
+        /// </summary>
+        /// <param name="palletDto"></param>
+        /// <returns></returns>
+        [HttpPost, Route("ReCheckGroupPallet"), AllowAnonymous]
+        public async Task<WebResponseContent> ReCheckGroupPallet([FromBody] GroupPalletDto palletDto)
+        {
+            return await Service.ReCheckGroupPallet(palletDto);
+        }
+        /// <summary>
         /// 鍏ュ簱鍒嗘壒鍥炰紶MES
         /// </summary>
         /// <param name="palletDto"></param>

--
Gitblit v1.9.3