From dcdb87f1cb6cfd66d3fc01bc2248e4876c37f223 Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期日, 30 十一月 2025 18:14:12 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu
---
项目代码/WIDESEA_WMSClient/src/extension/inbound/allocateinboundOrder.js | 4
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs | 14 +
项目代码/WIDESEA_WMSClient/src/extension/outbound/extend/NoStockOut.vue | 269 ++++++++-----------------------------
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_BasicService/InvokeMESService.cs | 110 +++++++++++----
4 files changed, 153 insertions(+), 244 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/allocateinboundOrder.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/allocateinboundOrder.js"
index 76c131e..a3e70ed 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/allocateinboundOrder.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/inbound/allocateinboundOrder.js"
@@ -194,8 +194,8 @@
// 鏀堕泦鎵�鏈夐�変腑鍗曟嵁鐨勭紪鍙凤紙杩囨护鏃犲崟鎹彿鐨勫紓甯歌锛�
const inboundOrderNos = selectedRows
- .filter(row => row.inboundOrderNo)
- .map(row => row.inboundOrderNo);
+ .filter(row => row.orderNo)
+ .map(row => row.orderNo);
// 鏍¢獙2锛氭槸鍚︽湁鏈夋晥鍗曟嵁鍙�
if (inboundOrderNos.length === 0) {
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/NoStockOut.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/NoStockOut.vue"
index d058411..95df14e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/NoStockOut.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/NoStockOut.vue"
@@ -9,51 +9,29 @@
class="custom-vol-box"
>
<div>
- <!-- 鍗曟嵁閫夋嫨鍖哄煙锛堝彲杈撳叆鎼滅储锛� -->
+ <!-- 鍗曟嵁杈撳叆鍖哄煙锛堟敮鎸佹壂鐮侊級 -->
<el-form :inline="true" :model="orderForm" style="margin-bottom: 20px; align-items: flex-end;">
- <el-form-item label="鍑哄簱鍗曟嵁:" name="outboundOrderId">
- <el-select
- v-model="orderForm.outboundOrderId"
- placeholder="璇烽�夋嫨鎴栨壂鎻忓嚭搴撳崟鎹彿"
+ <el-form-item label="鍑哄簱鍗曟嵁:" name="outboundOrderNo">
+ <el-input
+ v-model="orderForm.outboundOrderNo"
+ placeholder="璇疯緭鍏ユ垨鎵弿鍑哄簱鍗曟嵁鍙�"
clearable
style="width: 220px; margin-right: 10px;"
- @change="handleOrderChange"
- @visible-change="handleOutboundVisibleChange"
- :loading="loading"
- filterable
- :filter-method="filterOutboundOrders"
- @input="handleOutboundScanInput"
- ref="outboundSelectRef"
- >
- <el-option
- v-for="order in filteredOutboundOrders"
- :key="order.id"
- :label="order.orderNo"
- :value="order.id"
- ></el-option>
- </el-select>
+ @input="handleOutboundInput"
+ @keyup.enter="focusPurchaseInput"
+ ref="outboundInputRef"
+ ></el-input>
</el-form-item>
- <el-form-item label="閲囪喘鍗曟嵁:" name="purchaseOrderId">
- <el-select
- v-model="orderForm.purchaseOrderId"
- placeholder="璇烽�夋嫨鎴栨壂鎻忛噰璐崟鎹彿"
+ <el-form-item label="閲囪喘鍗曟嵁:" name="purchaseOrderNo">
+ <el-input
+ v-model="orderForm.purchaseOrderNo"
+ placeholder="璇疯緭鍏ユ垨鎵弿閲囪喘鍗曟嵁鍙�"
clearable
style="width: 220px; margin-right: 10px;"
- @change="handleOrderChange"
- @visible-change="handlePurchaseVisibleChange"
- :loading="loading"
- filterable
- :filter-method="filterPurchaseOrders"
- @input="handlePurchaseScanInput"
- ref="purchaseSelectRef"
- >
- <el-option
- v-for="order in filteredPurchaseOrders"
- :key="order.id"
- :label="order.orderNo"
- :value="order.id"
- ></el-option>
- </el-select>
+ @input="handlePurchaseInput"
+ @keyup.enter="focusBarcodeInput"
+ ref="purchaseInputRef"
+ ></el-input>
</el-form-item>
</el-form>
@@ -72,7 +50,7 @@
@keyup.enter="handleScan"
autofocus
class="custom-input"
- :disabled="!orderForm.outboundOrderId || !orderForm.purchaseOrderId"
+ :disabled="!orderForm.outboundOrderNo || !orderForm.purchaseOrderNo"
></el-input>
</el-form-item>
<el-form-item>
@@ -81,7 +59,7 @@
size="small"
@click="handleScan"
class="custom-button"
- :disabled="!orderForm.outboundOrderId || !orderForm.purchaseOrderId || loading"
+ :disabled="!orderForm.outboundOrderNo || !orderForm.purchaseOrderNo || loading"
>
<Search /> 纭鎵弿
</el-button>
@@ -109,7 +87,7 @@
</div>
</transition-group>
<div class="empty-tip" v-if="scannedBarcodes.length === 0">
- <span>鏆傛棤鎵弿璁板綍锛岃鍏堥�夋嫨鍗曟嵁鍚庢壂鎻忔潯鐮�</span>
+ <span>鏆傛棤鎵弿璁板綍锛岃鍏堣緭鍏ュ崟鎹悗鎵弿鏉$爜</span>
</div>
</el-scrollbar>
</div>
@@ -123,7 +101,7 @@
type="primary"
size="small"
@click="submit"
- :disabled="scannedBarcodes.length === 0 || !orderForm.outboundOrderId || !orderForm.purchaseOrderId || loading"
+ :disabled="scannedBarcodes.length === 0 || !orderForm.outboundOrderNo || !orderForm.purchaseOrderNo || loading"
class="submit-btn"
>
<Check /> 鎻愪氦鍑哄簱
@@ -140,6 +118,7 @@
<script setup>
import { ref, reactive, onMounted, nextTick } from 'vue';
import { ElMessage } from 'element-plus';
+import { Search } from '@element-plus/icons-vue';
import VolBox from "@/components/basic/VolBox.vue";
import http from '@/api/http';
@@ -147,32 +126,26 @@
// 鍝嶅簲寮忔暟鎹�
const showDetailBox = ref(false);
const orderForm = reactive({
- outboundOrderId: "",
- purchaseOrderId: ""
+ outboundOrderNo: "",
+ purchaseOrderNo: ""
});
const formData = reactive({
barcode: "",
});
const scannedBarcodes = ref([]);
-const outboundOrders = ref([]);
-const purchaseOrders = ref([]);
-const filteredOutboundOrders = ref([]);
-const filteredPurchaseOrders = ref([]);
const loading = ref(false);
// 妯℃澘寮曠敤
const formRef = ref(null);
const barcodeInputRef = ref(null);
-const outboundSelectRef = ref(null); // 鏂板锛氬嚭搴撳崟select鐨剅ef
-const purchaseSelectRef = ref(null); // 鏂板锛氶噰璐崟select鐨剅ef
+const outboundInputRef = ref(null);
+const purchaseInputRef = ref(null);
-// 鐢ㄤ簬闃叉杈撳叆浜嬩欢鍜宑hange浜嬩欢鍐茬獊鐨勯攣
-const isProcessingScan = ref(false);
-
-// 缁勪欢鎸傝浇鏃跺垵濮嬪寲杩囨护鍚庣殑鍒楄〃
+// 缁勪欢鎸傝浇鏃惰仛鐒﹀埌鍑哄簱鍗曡緭鍏ユ
onMounted(() => {
- filteredOutboundOrders.value = [...outboundOrders.value];
- filteredPurchaseOrders.value = [...purchaseOrders.value];
+ nextTick(() => {
+ outboundInputRef.value?.focus();
+ });
});
// 鎵撳紑寮圭獥
@@ -180,169 +153,44 @@
showDetailBox.value = true;
scannedBarcodes.value = [];
formData.barcode = "";
- orderForm.outboundOrderId = "";
- orderForm.purchaseOrderId = "";
+ orderForm.outboundOrderNo = "";
+ orderForm.purchaseOrderNo = "";
nextTick(() => {
- barcodeInputRef.value?.focus();
+ outboundInputRef.value?.focus();
});
};
-// 鍔犺浇鍑哄簱鍗曟嵁鍒楄〃
-const loadOutboundOrders = async () => {
- if (outboundOrders.value.length > 0) return;
- try {
- loading.value = true;
- const res = await http.get("/api/OutboundPicking/GetAvailablePickingOrders");
-
- if (res.code === 0) {
- outboundOrders.value = res.data.map(orderNo => ({
- id: orderNo,
- orderNo: orderNo
- }));
- filteredOutboundOrders.value = [...outboundOrders.value];
- } else {
- ElMessage.error("鍔犺浇鍑哄簱鍗曟嵁澶辫触锛�" + (res.message || '鏈煡閿欒'));
- }
- } catch (error) {
- ElMessage.error("鍔犺浇鍑哄簱鍗曟嵁寮傚父锛�" + error.message);
- } finally {
- loading.value = false;
+// 鍑哄簱鍗曡緭鍏ュ鐞嗭紙鎵爜鎴栨墜鍔ㄨ緭鍏ワ級
+const handleOutboundInput = (value) => {
+ // 鎵爜鏋緭鍏ラ�氬父浼氳嚜鍔ㄨЕ鍙慹nter浜嬩欢锛岃繖閲屼富瑕佸鐞嗘墜鍔ㄨ緭鍏ョ殑鎯呭喌
+ if (value && value.trim()) {
+ // 鍙互鍦ㄨ繖閲屾坊鍔犲嚭搴撳崟鍙风殑鏍煎紡楠岃瘉閫昏緫
}
};
-// 鍔犺浇閲囪喘鍗曟嵁鍒楄〃
-const loadPurchaseOrders = async () => {
- if (purchaseOrders.value.length > 0) return;
- try {
- loading.value = true;
- const res = await http.get("/api/OutboundPicking/GetAvailablePurchaseOrders");
-
- if (res.status === true) {
- purchaseOrders.value = res.data.map(orderNo => ({
- id: orderNo,
- orderNo: orderNo
- }));
- filteredPurchaseOrders.value = [...purchaseOrders.value];
- } else {
- ElMessage.error("鍔犺浇閲囪喘鍗曟嵁澶辫触锛�" + (res.message || '鏈煡閿欒'));
- }
- } catch (error) {
- ElMessage.error("鍔犺浇閲囪喘鍗曟嵁寮傚父锛�" + error.message);
- } finally {
- loading.value = false;
+// 閲囪喘鍗曡緭鍏ュ鐞嗭紙鎵爜鎴栨墜鍔ㄨ緭鍏ワ級
+const handlePurchaseInput = (value) => {
+ if (value && value.trim()) {
+ // 鍙互鍦ㄨ繖閲屾坊鍔犻噰璐崟鍙风殑鏍煎紡楠岃瘉閫昏緫
}
};
-// 鍑哄簱鍗曟嵁杩囨护鏂规硶
-const filterOutboundOrders = (value) => {
- if (!value) {
- filteredOutboundOrders.value = [...outboundOrders.value];
+// 鐒︾偣璺宠浆鍑芥暟
+const focusPurchaseInput = () => {
+ if (orderForm.outboundOrderNo.trim()) {
+ purchaseInputRef.value?.focus();
} else {
- const lowerValue = value.toLowerCase();
- filteredOutboundOrders.value = outboundOrders.value.filter(order =>
- order.orderNo.toLowerCase().includes(lowerValue)
- );
+ ElMessage.warning("璇峰厛杈撳叆鏈夋晥鐨勫嚭搴撳崟鎹彿");
}
};
-// 閲囪喘鍗曟嵁杩囨护鏂规硶
-const filterPurchaseOrders = (value) => {
- if (!value) {
- filteredPurchaseOrders.value = [...purchaseOrders.value];
- } else {
- const lowerValue = value.toLowerCase();
- filteredPurchaseOrders.value = purchaseOrders.value.filter(order =>
- order.orderNo.toLowerCase().includes(lowerValue)
- );
- }
-};
-
-// 鍑哄簱鍗曟嵁涓嬫媺妗嗘樉绀�/闅愯棌鏃惰Е鍙�
-const handleOutboundVisibleChange = (visible) => {
- if (visible) {
- loadOutboundOrders();
- } else {
- // 褰撲笅鎷夋鍏抽棴鏃讹紝濡傛灉鏄壂鎻忔搷浣滃鑷寸殑锛屾竻绌鸿緭鍏ユ
- if (isProcessingScan.value) {
- nextTick(() => {
- outboundSelectRef.value?.clearInput();
- isProcessingScan.value = false;
- });
- }
- }
-};
-
-// 閲囪喘鍗曟嵁涓嬫媺妗嗘樉绀�/闅愯棌鏃惰Е鍙�
-const handlePurchaseVisibleChange = (visible) => {
- if (visible) {
- loadPurchaseOrders();
- } else {
- // 褰撲笅鎷夋鍏抽棴鏃讹紝濡傛灉鏄壂鎻忔搷浣滃鑷寸殑锛屾竻绌鸿緭鍏ユ
- if (isProcessingScan.value) {
- nextTick(() => {
- purchaseSelectRef.value?.clearInput();
- isProcessingScan.value = false;
- });
- }
- }
-};
-
-// 鍗曟嵁閫夋嫨鍙樺寲鏃惰Е鍙�
-const handleOrderChange = () => {
- // 濡傛灉鏄墜鍔ㄩ�夋嫨锛屽垯涓嶆竻绌鸿緭鍏ユ
- isProcessingScan.value = false;
-
- scannedBarcodes.value = [];
- nextTick(() => {
+const focusBarcodeInput = () => {
+ if (orderForm.purchaseOrderNo.trim()) {
barcodeInputRef.value?.focus();
- });
-};
-
-/**
- * 澶勭悊鍑哄簱鍗曟壂鎻忚緭鍏�
- * @param {string} scanText - 鎵弿鏋緭鍏ョ殑鏂囨湰
- */
-const handleOutboundScanInput = async (scanText) => {
- // 閬垮厤澶勭悊绌哄瓧绗︿覆鎴栫敱change浜嬩欢瑙﹀彂鐨勫唴閮ㄦ搷浣�
- if (!scanText || isProcessingScan.value) return;
-
- // 鏌ユ壘瀹屽叏鍖归厤鐨勮鍗�
- const matchedOrder = outboundOrders.value.find(order => order.orderNo === scanText);
-
- if (matchedOrder) {
- isProcessingScan.value = true; // 鏍囪涓烘鍦ㄥ鐞嗘壂鎻�
- // 鎵嬪姩璧嬪��
- orderForm.outboundOrderId = matchedOrder.id;
- ElMessage.success(`鎴愬姛閫夋嫨鍑哄簱鍗曪細${matchedOrder.orderNo}`);
-
- // 寤惰繜鑱氱劍鍒颁笅涓�涓緭鍏ユ锛岀‘淇濊祴鍊煎畬鎴�
- setTimeout(() => {
- purchaseSelectRef.value?.focus();
- }, 100);
- }
- // 濡傛灉娌℃湁鍖归厤椤癸紝涓嶅仛浠讳綍浜嬶紝璁〆l-select淇濇寔杩囨护鐘舵�侊紝鐢ㄦ埛鍙互鎵嬪姩閫夋嫨
-};
-
-/**
- * 澶勭悊閲囪喘鍗曟壂鎻忚緭鍏�
- * @param {string} scanText - 鎵弿鏋緭鍏ョ殑鏂囨湰
- */
-const handlePurchaseScanInput = async (scanText) => {
- if (!scanText || isProcessingScan.value) return;
-
- const matchedOrder = purchaseOrders.value.find(order => order.orderNo === scanText);
-
- if (matchedOrder) {
- isProcessingScan.value = true; // 鏍囪涓烘鍦ㄥ鐞嗘壂鎻�
- orderForm.purchaseOrderId = matchedOrder.id;
- ElMessage.success(`鎴愬姛閫夋嫨閲囪喘鍗曪細${matchedOrder.orderNo}`);
-
- setTimeout(() => {
- barcodeInputRef.value?.focus();
- }, 100);
+ } else {
+ ElMessage.warning("璇峰厛杈撳叆鏈夋晥鐨勯噰璐崟鎹彿");
}
};
-
// 鎵弿鏉$爜澶勭悊
const handleScan = async () => {
@@ -360,9 +208,10 @@
try {
loading.value = true;
+ // 杩欓噷淇濈暀浜嗗師鏈夌殑鏉$爜楠岃瘉鎺ュ彛锛屼綘鍙互鏍规嵁瀹為檯闇�姹備慨鏀规垨淇濈暀
const res = await http.post("/api/OutboundPicking/BarcodeValidate", {
- outOder: orderForm.outboundOrderId,
- inOder: orderForm.purchaseOrderId,
+ outOder: orderForm.outboundOrderNo, // 娉ㄦ剰锛氳繖閲岀幇鍦ㄤ紶閫掔殑鏄崟鎹彿瀛楃涓诧紝鑰屼笉鏄疘D
+ inOder: orderForm.purchaseOrderNo, // 娉ㄦ剰锛氳繖閲岀幇鍦ㄤ紶閫掔殑鏄崟鎹彿瀛楃涓诧紝鑰屼笉鏄疘D
barCode: barcode
});
@@ -385,9 +234,10 @@
const removeItem = async (index, barcode) => {
try {
loading.value = true;
+ // 杩欓噷淇濈暀浜嗗師鏈夌殑鍒犻櫎鏉$爜鎺ュ彛锛屼綘鍙互鏍规嵁瀹為檯闇�姹備慨鏀规垨淇濈暀
const res = await http.post("/api/OutboundPicking/DeleteBarcode", {
- outOder: orderForm.outboundOrderId,
- inOder: orderForm.purchaseOrderId,
+ outOder: orderForm.outboundOrderNo,
+ inOder: orderForm.purchaseOrderNo,
barCode: barcode
});
@@ -415,9 +265,10 @@
try {
loading.value = true;
+ // 杩欓噷淇濈暀浜嗗師鏈夌殑鎻愪氦鎺ュ彛锛屾敞鎰忓弬鏁扮幇鍦ㄤ紶閫掔殑鏄崟鎹彿瀛楃涓�
const res = await http.post("/api/OutboundPicking/NoStockOutSubmit", {
- OutOderSubmit: orderForm.outboundOrderId,
- InOderSubmit: orderForm.purchaseOrderId,
+ OutOderSubmit: orderForm.outboundOrderNo,
+ InOderSubmit: orderForm.purchaseOrderNo,
BarCodeSubmit: barcodes
});
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/InvokeMESService.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/InvokeMESService.cs"
index 4ad3447..898a013 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/InvokeMESService.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/InvokeMESService.cs"
@@ -14,6 +14,7 @@
using WIDESEA_Common.StockEnum;
using WIDESEA_Core;
using WIDESEA_Core.BaseRepository;
+using WIDESEA_Core.Helper;
using WIDESEA_DTO.Allocate;
using WIDESEA_DTO.Basic;
using WIDESEA_DTO.Inbound;
@@ -248,42 +249,89 @@
var inboundOrder = _inboundOrderRepository.Db.Queryable<Dt_InboundOrder>().First(x => x.InboundOrderNo == lists.FirstOrDefault().OrderNo);
if (inboundOrder != null)
{
- var feedmodel = new FeedbackInboundRequestModel
+ if (inboundOrder.OrderType == (int)InOrderTypeEnum.AllocatInbound)//璋冩嫧鍏ュ簱
{
- reqCode = Guid.NewGuid().ToString(),
- reqTime = DateTime.Now.ToString(),
- business_type = inboundOrder.BusinessType,
- factoryArea = inboundOrder.FactoryArea,
- operationType = 1,
- Operator = inboundOrder.Operator,
- orderNo = inboundOrder.UpperOrderNo,
- status = inboundOrder.OrderStatus,
- details = new List<FeedbackInboundDetailsModel>()
+ var allocate = SqlSugarHelper.DbWMS.Queryable<Dt_AllocateOrder>().Where(x => x.OrderNo == inboundOrder.InboundOrderNo).First();
+ var allocatefeedmodel = new AllocateDto
+ {
+ ReqCode = Guid.NewGuid().ToString(),
+ ReqTime = DateTime.Now.ToString(),
+ BusinessType = "2",
+ FactoryArea = inboundOrder.FactoryArea,
+ OperationType = 1,
+ Operator = inboundOrder.Operator,
+ OrderNo = inboundOrder.UpperOrderNo,
+ fromWarehouse = allocate?.FromWarehouse ?? "",
+ toWarehouse = allocate?.ToWarehouse ?? "",
+ Details = new List<AllocateDtoDetail>()
- };
+ };
- var groupedData = lists.GroupBy(item => new { item.MaterielCode, item.SupplyCode, item.BatchNo, item.InboundOrderRowNo, item.BarcodeUnit, item.WarehouseCode })
- .Select(group => new FeedbackInboundDetailsModel
- {
- materialCode = group.Key.MaterielCode,
- supplyCode = group.Key.SupplyCode,
- batchNo = group.Key.BatchNo,
- lineNo = group.Key.InboundOrderRowNo,
- qty = group.Sum(x => x.BarcodeQty),
- // warehouseCode = group.Key.WarehouseCode=="0"?"1072": group.Key.WarehouseCode,
- warehouseCode = group.Key.WarehouseCode,
- unit = group.Key.BarcodeUnit,
- barcodes = group.Select(row => new FeedbackBarcodesModel
+ var groupedData = lists.GroupBy(item => new { item.MaterielCode, item.SupplyCode, item.BatchNo, item.InboundOrderRowNo, item.BarcodeUnit, item.WarehouseCode })
+ .Select(group => new AllocateDtoDetail
{
- barcode = row.Barcode,
- qty = row.BarcodeQty
- }).ToList()
- }).ToList();
- feedmodel.details = groupedData;
- var result = await FeedbackInbound(feedmodel);
- if (result != null && result.code == 200)
+ MaterialCode = group.Key.MaterielCode,
+ LineNo = group.Key.InboundOrderRowNo,
+ WarehouseCode = group.Key.WarehouseCode,
+ Qty = group.Sum(x => x.BarcodeQty),
+ // warehouseCode= "1072",
+ Unit = group.Key.BarcodeUnit,
+ Barcodes = group.Select(row => new BarcodeInfo
+ {
+ Barcode = row.Barcode,
+ Qty = row.BarcodeQty,
+ BatchNo = row.BatchNo,
+ SupplyCode = row.SupplyCode,
+ Unit = row.Unit
+ }).ToList()
+ }).ToList();
+ allocatefeedmodel.Details = groupedData;
+
+ var result = await FeedbackAllocate(allocatefeedmodel);
+ if (result != null && result.code == 200)
+ {
+ _feedbacktomesRepository.Db.Insertable(new Dt_FeedbackToMes { OrderNo = orderNo, PalletCode = item.PalletCode, ReportStatus = 1 }).ExecuteCommand();
+ }
+ }
+ else
{
- _feedbacktomesRepository.Db.Insertable(new Dt_FeedbackToMes { OrderNo = orderNo, PalletCode = item.PalletCode, ReportStatus = 1 }).ExecuteCommand();
+ var feedmodel = new FeedbackInboundRequestModel
+ {
+ reqCode = Guid.NewGuid().ToString(),
+ reqTime = DateTime.Now.ToString(),
+ business_type = inboundOrder.BusinessType,
+ factoryArea = inboundOrder.FactoryArea,
+ operationType = 1,
+ Operator = inboundOrder.Operator,
+ orderNo = inboundOrder.UpperOrderNo,
+ status = inboundOrder.OrderStatus,
+ details = new List<FeedbackInboundDetailsModel>()
+
+ };
+
+ var groupedData = lists.GroupBy(item => new { item.MaterielCode, item.SupplyCode, item.BatchNo, item.InboundOrderRowNo, item.BarcodeUnit, item.WarehouseCode })
+ .Select(group => new FeedbackInboundDetailsModel
+ {
+ materialCode = group.Key.MaterielCode,
+ supplyCode = group.Key.SupplyCode,
+ batchNo = group.Key.BatchNo,
+ lineNo = group.Key.InboundOrderRowNo,
+ qty = group.Sum(x => x.BarcodeQty),
+ // warehouseCode = group.Key.WarehouseCode=="0"?"1072": group.Key.WarehouseCode,
+ warehouseCode = group.Key.WarehouseCode,
+ unit = group.Key.BarcodeUnit,
+ barcodes = group.Select(row => new FeedbackBarcodesModel
+ {
+ barcode = row.Barcode,
+ qty = row.BarcodeQty
+ }).ToList()
+ }).ToList();
+ feedmodel.details = groupedData;
+ var result = await FeedbackInbound(feedmodel);
+ if (result != null && result.code == 200)
+ {
+ _feedbacktomesRepository.Db.Insertable(new Dt_FeedbackToMes { OrderNo = orderNo, PalletCode = item.PalletCode, ReportStatus = 1 }).ExecuteCommand();
+ }
}
}
}
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/OutboundPickingService.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/OutboundPickingService.cs"
index 0fb6e2d..35490c5 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/OutboundPickingService.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/OutboundPickingService.cs"
@@ -2723,17 +2723,27 @@
}
//鍒ゆ柇鍏ュ簱鍗曟嵁鏄庣粏鏄惁鍏ㄩ儴鏄畬鎴愮姸鎬�
- bool inoderOver = inboundOrder.Details.Count() == inboundOrder.Details.Select(x => x.OrderDetailStatus == OrderDetailStatusEnum.Over.ObjToInt()).Count();
+ int e = inboundOrder.Details.Count();
+ int w = inboundOrder.Details.Where(x => x.OrderDetailStatus == OrderDetailStatusEnum.Over.ObjToInt()).Count();
+ bool inoderOver = inboundOrder.Details.Count() == inboundOrder.Details.Where(x => x.OrderDetailStatus == OrderDetailStatusEnum.Over.ObjToInt()).Count();
if (inoderOver)
{
inboundOrder.OrderStatus = InOrderStatusEnum.鍏ュ簱瀹屾垚.ObjToInt();
}
+ else
+ {
+ inboundOrder.OrderStatus = InOrderStatusEnum.鍏ュ簱涓�.ObjToInt();
+ }
//鍒ゆ柇鍑哄簱鍗曟嵁鏄庣粏鏄惁鍏ㄩ儴鏄畬鎴愮姸鎬�
- bool outOderOver = outboundOrder.Details.Count() == outboundOrder.Details.Select(x => x.OrderDetailStatus == OrderDetailStatusEnum.Over.ObjToInt()).Count();
+ bool outOderOver = outboundOrder.Details.Count() == outboundOrder.Details.Where(x => x.OrderDetailStatus == OrderDetailStatusEnum.Over.ObjToInt()).Count();
if (outOderOver)
{
outboundOrder.OrderStatus = OutOrderStatusEnum.鍑哄簱瀹屾垚.ObjToInt();
}
+ else
+ {
+ outboundOrder.OrderStatus = OutOrderStatusEnum.鍑哄簱涓�.ObjToInt();
+ }
//鏁版嵁澶勭悊
_unitOfWorkManage.BeginTran();
_inboundOrderDetailService.UpdateData(inboundOrderDetails);
--
Gitblit v1.9.3