From c84db706e8c8d82a96bb4b4c18c243a42b2976c1 Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期三, 19 十一月 2025 19:44:30 +0800
Subject: [PATCH] 提交
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Allocate/AllocateOrderController.cs | 6
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_DTO/Allocate/AllocateDto.cs | 3
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_IAllocateService/IAllocateService.cs | 2
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs | 5
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_StockService/WIDESEA_StockService.csproj | 1
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundOrderController.cs | 8
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockSelectViewDTO.cs | 2
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs | 4
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs | 2
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Common/OrderEnum/InboundOrderMenu.cs | 3
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 80 ++++++---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs | 12 +
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrder.cs | 6
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutStockLockInfoController.cs | 12 +
项目代码/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue | 16 +-
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs | 76 +++++----
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs | 2
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrderDetail.cs | 27 +++
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundOrderService.cs | 2
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs | 7
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrder.cs | 6
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Model/Models/Allocate/Dt_ AllocateOrder.cs | 7
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs | 5
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs | 63 +++++++
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs | 65 +++++--
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_AllocateService/AllocateService.cs | 28 +-
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Common/OrderEnum/OutboundOrderEnum.cs | 4
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Model/Models/Inbound/Dt_InboundOrderDetail.cs | 6
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Model/Models/Allocate/Dt_AllocateOrderDetail.cs | 14 +
29 files changed, 347 insertions(+), 127 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue"
index c4dcc64..55145a5 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue"
@@ -24,13 +24,13 @@
</span>
</el-col>
<el-col :span="8">
- <el-link
+ <!-- <el-link
type="primary"
size="small"
style="float: right; height: 20px"
@click="getData(false)"
>{{ kcname }}</el-link
- >
+ > -->
<el-link
type="primary"
size="small"
@@ -38,13 +38,13 @@
@click="getData"
>鍒锋柊</el-link
>
- <el-link
+ <!-- <el-link
type="primary"
size="small"
style="float: right; height: 20px; margin-right: 10px"
@click="revokeAssign"
>鎾ら攢鍒嗛厤</el-link
- >
+ > -->
</el-col>
</el-row>
</el-alert>
@@ -92,12 +92,12 @@
</el-table>
</div>
<template #footer>
- <el-button type="primary" size="small" @click="outbound"
+ <!-- <el-button type="primary" size="small" @click="outbound"
>鐩存帴鍑哄簱</el-button
>
<el-button type="primary" size="small" @click="lockStock"
>閿佸畾搴撳瓨</el-button
- >
+ > -->
<el-button type="danger" size="small" @click="showDetialBox = false"
>鍏抽棴</el-button
>
@@ -191,7 +191,7 @@
return this.$message.error("璇峰嬀閫�");
}
let url = this.pkcx
- ? "api/Task/GeneratePKOutboundTask?orderDetailId="
+ ? "api/Task/GenerateOutboundTask?orderDetailId="
: "api/Task/GenerateOutboundTask?orderDetailId=";
this.http
.post(url + this.row.id, this.selection, "鏁版嵁澶勭悊涓�")
@@ -207,7 +207,7 @@
getData(a) {
if (!a) this.pkcx = !this.pkcx;
let url = this.pkcx
- ? "api/StockInfo/GetPKStockSelectViews?materielCode="
+ ? "api/StockInfo/GetStockSelectViews?materielCode="
: "api/StockInfo/GetStockSelectViews?materielCode=";
this.kcname = this.pkcx ? "绔嬪簱搴撳瓨" : "骞冲簱搴撳瓨";
this.http
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_AllocateService/AllocateService.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_AllocateService/AllocateService.cs"
index 0314eb8..6c4bb77 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_AllocateService/AllocateService.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_AllocateService/AllocateService.cs"
@@ -1,11 +1,13 @@
锘縰sing Microsoft.Extensions.Logging;
using SqlSugar;
+using SqlSugar.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Common.AllocateEnum;
+using WIDESEA_Common.OrderEnum;
using WIDESEA_Core;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
@@ -50,14 +52,14 @@
public IRepository<Dt_AllocateOrder> Repository => BaseDal;
- public WebResponseContent ReceiveAllocateOrder(Dt_AllocateOrder allocateOrder, int operateType)
+ public async Task<WebResponseContent> ReceiveAllocateOrder(Dt_AllocateOrder allocateOrder, int operateType)
{
try
{
return operateType switch
{
- 1 => AddAllocateOrder(allocateOrder),
- 2 => UpdateAllocateOrder(allocateOrder),
+ 1 => await AddAllocateOrder(allocateOrder),
+ 2 => await UpdateAllocateOrder(allocateOrder),
3 => DeleteAllocateOrder(allocateOrder),
_ => WebResponseContent.Instance.OK(),
@@ -69,7 +71,7 @@
}
}
- public WebResponseContent AddAllocateOrder(Dt_AllocateOrder allocateOrder)
+ public async Task<WebResponseContent> AddAllocateOrder(Dt_AllocateOrder allocateOrder)
{
try
{
@@ -81,15 +83,15 @@
Db.InsertNav(allocateOrder).Include(x => x.Details).ExecuteCommand();
if (Enum.TryParse<BusinessTypeEnum>(allocateOrder.BusinessType, out var businessType))
{
- if (businessType == BusinessTypeEnum.澶栭儴浠撳簱璋冩櫤浠�)
+ if (businessType == BusinessTypeEnum.鏅轰粨璋冨閮ㄤ粨搴�)
{
var inboundOrders = ConvertToInboundOrders(allocateOrder);
- _inboundService.InbounOrderService.ReceiveInboundOrder(inboundOrders, 1);
+ await _inboundService.InbounOrderService.ReceiveInboundOrder(inboundOrders, 1);
}
- else if (businessType == BusinessTypeEnum.鏅轰粨璋冨閮ㄤ粨搴�)
+ else if (businessType == BusinessTypeEnum.澶栭儴浠撳簱璋冩櫤浠�)
{
var outboundOrders = ConvertToOutboundOrders(allocateOrder);
- _outboundService.OutboundOrderService.ReceiveOutboundOrder(outboundOrders, 1);
+ await _outboundService.OutboundOrderService.ReceiveOutboundOrder(outboundOrders, 1);
}
else
{
@@ -105,7 +107,7 @@
return WebResponseContent.Instance.Error(ex.Message);
}
}
- public WebResponseContent UpdateAllocateOrder(Dt_AllocateOrder model)
+ public async Task<WebResponseContent> UpdateAllocateOrder(Dt_AllocateOrder model)
{
try
{
@@ -238,7 +240,7 @@
InboundOrderNo=allocateOrder.OrderNo,
UpperOrderNo=allocateOrder.UpperOrderNo,
SupplierId=allocateOrder.SupplierId,
- OrderType=allocateOrder.OrderType,
+ OrderType=InOrderTypeEnum.Allocat.ObjToInt(),
OrderStatus=allocateOrder.OrderStatus,
CreateType=allocateOrder.CreateType,
BusinessType=allocateOrder.BusinessType,
@@ -257,7 +259,7 @@
OrderDetailStatus=detail.OrderDetailStatus,
Unit=detail.Unit,
RowNo=0,
- SupplyCode="",
+ SupplyCode=detail.SupplyCode,
WarehouseCode=detail.WarehouseCode,
Barcode=detail.Barcode,
OutBoxbarcodes="",
@@ -275,7 +277,7 @@
WarehouseId = allocateOrder.WarehouseId,
OrderNo = allocateOrder.OrderNo,
UpperOrderNo = allocateOrder.UpperOrderNo,
- OrderType = allocateOrder.OrderType,
+ OrderType = OutOrderTypeEnum.Allocate.ObjToInt(),
OrderStatus = allocateOrder.OrderStatus,
CreateType = allocateOrder.CreateType,
BusinessType = allocateOrder.BusinessType,
@@ -296,7 +298,7 @@
OrderDetailStatus = detail.OrderDetailStatus,
Unit = detail.Unit,
RowNo = 0,
- SupplyCode = "",
+ SupplyCode = detail.SupplyCode,
WarehouseCode = detail.WarehouseCode,
}).ToList()
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_Common/OrderEnum/InboundOrderMenu.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_Common/OrderEnum/InboundOrderMenu.cs"
index 2c53935..4365b1b 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_Common/OrderEnum/InboundOrderMenu.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_Common/OrderEnum/InboundOrderMenu.cs"
@@ -72,6 +72,9 @@
[Description("璋冩嫧鍏ュ簱鍗�")]
Allocat = 115,
+ [Description("閲嶆鍥炲簱")]
+ ReCheck =116,
+
/// <summary>
/// 閿�鍞��璐у崟
/// </summary>
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_Common/OrderEnum/OutboundOrderEnum.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_Common/OrderEnum/OutboundOrderEnum.cs"
index 3b43f33..879747f 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_Common/OrderEnum/OutboundOrderEnum.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_Common/OrderEnum/OutboundOrderEnum.cs"
@@ -69,6 +69,10 @@
[Description("璋冩嫧鍑哄簱鍗�")]
Allocate = 215,
+
+ [Description("閲嶆鍑哄簱鍗�")]
+ ReCheck = 216,
+
/// <summary>
/// 閿�鍞嚭搴撳崟
/// </summary>
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_DTO/Allocate/AllocateDto.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_DTO/Allocate/AllocateDto.cs"
index faef31e..d81c4d1 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_DTO/Allocate/AllocateDto.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_DTO/Allocate/AllocateDto.cs"
@@ -125,6 +125,9 @@
[JsonProperty("batchNo")]
public string BatchNo { get; set; }
+ [JsonProperty("supplyCode")]
+ public string SupplyCode { get; set; }
+
/// <summary>
/// 鏁伴噺
/// </summary>
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_DTO/Stock/StockSelectViewDTO.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_DTO/Stock/StockSelectViewDTO.cs"
index d90115b..6bffcc6 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_DTO/Stock/StockSelectViewDTO.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_DTO/Stock/StockSelectViewDTO.cs"
@@ -13,7 +13,7 @@
public string MaterielName { get; set; }
- public float UseableQuantity { get; set; }
+ public decimal UseableQuantity { get; set; }
public string PalletCode { get; set; }
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_IAllocateService/IAllocateService.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_IAllocateService/IAllocateService.cs"
index 3f4cd3f..5cfce97 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_IAllocateService/IAllocateService.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_IAllocateService/IAllocateService.cs"
@@ -16,6 +16,6 @@
{
IRepository<Dt_AllocateOrder> Repository { get; }
- WebResponseContent ReceiveAllocateOrder(Dt_AllocateOrder allocateOrder, int operateType);
+ Task<WebResponseContent> ReceiveAllocateOrder(Dt_AllocateOrder allocateOrder, int operateType);
}
}
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_IOutboundService/IOutStockLockInfoService.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_IOutboundService/IOutStockLockInfoService.cs"
index 154ef55..2aa1ffd 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_IOutboundService/IOutStockLockInfoService.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_IOutboundService/IOutStockLockInfoService.cs"
@@ -21,6 +21,8 @@
IRepository<Dt_OutStockLockInfo> Repository { get; }
Task<List<Dt_OutStockLockInfo>> GetByOrderDetailId(int orderDetailId);
+
+ List<Dt_OutStockLockInfo> GetByOrderDetailId(int orderDetailId, OutLockStockStatusEnum? outStockStatus);
Task<List<Dt_OutStockLockInfo>> GetByPalletCode(string palletCode, int? status = null);
Task<LockInfoDetailDto> GetLockInfoDetail(int lockInfoId);
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_IOutboundService/IOutboundOrderService.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_IOutboundService/IOutboundOrderService.cs"
index 0f47b1c..9ec6408 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_IOutboundService/IOutboundOrderService.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_IOutboundService/IOutboundOrderService.cs"
@@ -16,7 +16,7 @@
{
IRepository<Dt_OutboundOrder> Repository { get; }
- WebResponseContent ReceiveOutboundOrder(Dt_OutboundOrder model, int operateType);
+ Task<WebResponseContent> ReceiveOutboundOrder(Dt_OutboundOrder model, int operateType);
Task<WebResponseContent> GetById(int id);
}
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_IStockService/IStockInfoService.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_IStockService/IStockInfoService.cs"
index f7145c0..0af78c6 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_IStockService/IStockInfoService.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_IStockService/IStockInfoService.cs"
@@ -1,5 +1,6 @@
锘縰sing WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
+using WIDESEA_DTO.Stock;
using WIDESEA_Model.Models;
namespace WIDESEA_IStockService
@@ -9,11 +10,13 @@
IRepository<Dt_StockInfo> Repository { get; }
Dt_StockInfo? GetStockByPalletCode(string palletCode);
- List<Dt_StockInfo> GetStockInfos(string materielCode, string lotNo, List<string> locationCodes);
+ List<Dt_StockInfo> GetStockInfos(string materielCode, string lotNo, string supplyCode, List<string> locationCodes);
- List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo);
+ List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo,string supplyCode);
void AddMaterielGroup(Dt_StockInfo stockInfo);
(List<Dt_StockInfo>, Dictionary<int, decimal>) GetOutboundStocks(List<Dt_StockInfo> stockInfos, string materielCode, decimal needQuantity, out decimal residueQuantity);
+
+ List<StockSelectViewDTO> GetStockSelectViews(int orderId, string materielCode);
}
}
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/InboundOrderService.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/InboundOrderService.cs"
index c7fa1c9..b3af6bc 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/InboundOrderService.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/InboundOrderService.cs"
@@ -168,7 +168,9 @@
inboundOrderDetail.BarcodeUnit = item.BarcodeUnit;
inboundOrderDetail.BarcodeQty = item.BarcodeQty;
inboundOrderDetail.OrderQuantity = item.OrderQuantity;
-
+ var purchaseToStockResult = await _materialUnitService.ConvertPurchaseToStockAsync(item.MaterielCode, item.BarcodeQty);
+ inboundOrderDetail.Unit = purchaseToStockResult.Unit;
+ inboundOrderDetail.OrderQuantity = purchaseToStockResult.Quantity;
updateInboundOrderDetails.Add(inboundOrderDetail);
detailIds.Add(inboundOrderDetail.Id);
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_Model/Models/Allocate/Dt_ AllocateOrder.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_Model/Models/Allocate/Dt_ AllocateOrder.cs"
index b2abc43..f20eb36 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_Model/Models/Allocate/Dt_ AllocateOrder.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_Model/Models/Allocate/Dt_ AllocateOrder.cs"
@@ -101,6 +101,13 @@
[SugarColumn(IsNullable = false, Length = 200, ColumnDescription = "澶囨敞")]
public string Remark { get; set; }
+
+ /// <summary>
+ /// 鍥炰紶MES
+ /// </summary>
+ [SugarColumn(IsNullable = true, ColumnDescription = "鍥炰紶MES")]
+ public int ReturnToMESStatus { get; set; } = 0;
+
/// <summary>
/// 璋冩嫧鍗曟槑缁�
/// </summary>
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_Model/Models/Allocate/Dt_AllocateOrderDetail.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_Model/Models/Allocate/Dt_AllocateOrderDetail.cs"
index d184693..c5cf770 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_Model/Models/Allocate/Dt_AllocateOrderDetail.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_Model/Models/Allocate/Dt_AllocateOrderDetail.cs"
@@ -89,6 +89,14 @@
[SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鏉″舰鐮�")]
public string Barcode { get; set; }
+
+ /// <summary>
+ /// 渚涘簲鍟嗙紪鍙�
+ /// 榛樿鍊�:
+ ///</summary>
+ [SugarColumn(ColumnName = "supplyCode", ColumnDescription = "渚涘簲鍟嗙紪鍙�")]
+ public string? SupplyCode { get; set; }
+
/// <summary>
/// 鏉″舰鐮佹暟閲�
/// </summary>
@@ -106,5 +114,11 @@
/// </summary>
[SugarColumn(IsNullable = false, Length = 255, ColumnDescription = "澶囨敞")]
public string Remark { get; set; }
+
+ /// <summary>
+ /// 鍥炰紶MES
+ /// </summary>
+ [SugarColumn(IsNullable = true, ColumnDescription = "鍥炰紶MES")]
+ public int ReturnToMESStatus { get; set; } = 0;
}
}
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_Model/Models/Inbound/Dt_InboundOrder.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_Model/Models/Inbound/Dt_InboundOrder.cs"
index d0ca972..ee3cef0 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_Model/Models/Inbound/Dt_InboundOrder.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_Model/Models/Inbound/Dt_InboundOrder.cs"
@@ -95,6 +95,12 @@
[SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鎿嶄綔鑰�")]
public string Operator { get; set; }
+
+ /// <summary>
+ /// 鍥炰紶MES
+ /// </summary>
+ [SugarColumn(IsNullable = true, ColumnDescription = "鍥炰紶MES")]
+ public int ReturnToMESStatus { get; set; } = 0;
/// <summary>
/// 鍏ュ簱鍗曟槑缁�
/// </summary>
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_Model/Models/Inbound/Dt_InboundOrderDetail.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_Model/Models/Inbound/Dt_InboundOrderDetail.cs"
index d230385..92661a4 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_Model/Models/Inbound/Dt_InboundOrderDetail.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_Model/Models/Inbound/Dt_InboundOrderDetail.cs"
@@ -130,6 +130,12 @@
public string BarcodeUnit { get; set; } = null!;
/// <summary>
+ /// 鍥炰紶MES
+ /// </summary>
+ [SugarColumn(IsNullable = true, ColumnDescription = "鍥炰紶MES")]
+ public int ReturnToMESStatus { get; set; } = 0;
+
+ /// <summary>
/// 澶囨敞
/// </summary>
[SugarColumn(IsNullable = true, ColumnDescription = "澶囨敞")]
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_Model/Models/Outbound/Dt_OutboundOrder.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_Model/Models/Outbound/Dt_OutboundOrder.cs"
index 3bcafe6..8b8350f 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_Model/Models/Outbound/Dt_OutboundOrder.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_Model/Models/Outbound/Dt_OutboundOrder.cs"
@@ -102,6 +102,12 @@
[SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鎿嶄綔鑰�")]
public string Operator { get; set; }
+
+ /// <summary>
+ /// 鍥炰紶MES
+ /// </summary>
+ [SugarColumn(IsNullable = true, ColumnDescription = "鍥炰紶MES")]
+ public int ReturnToMESStatus { get; set; } = 0;
/// <summary>
/// 鍑哄簱鍗曟槑缁�
/// </summary>
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_Model/Models/Outbound/Dt_OutboundOrderDetail.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_Model/Models/Outbound/Dt_OutboundOrderDetail.cs"
index 675e532..3b8024e 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_Model/Models/Outbound/Dt_OutboundOrderDetail.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_Model/Models/Outbound/Dt_OutboundOrderDetail.cs"
@@ -101,11 +101,38 @@
public string? SupplyCode { get; set; }
/// <summary>
+ /// 鏁伴噺
+ /// 榛樿鍊�:
+ ///</summary>
+ [SugarColumn(ColumnName = "barcodeQty", ColumnDescription = "鏁伴噺")]
+ public decimal BarcodeQty { get; set; }
+
+ /// <summary>
+ /// 鍗曚綅
+ /// 榛樿鍊�:
+ ///</summary>
+ [SugarColumn(ColumnName = "barcodeUnit", ColumnDescription = "鍗曚綅")]
+ public string BarcodeUnit { get; set; } = null!;
+
+
+ /// <summary>
+ ///
+ /// 榛樿鍊�:
+ ///</summary>
+ [SugarColumn(ColumnName = "barcodemoveQty", ColumnDescription = "鏁伴噺")]
+ public decimal BarcodeMoveQty { get; set; }
+ /// <summary>
/// 浠撳簱
/// 榛樿鍊�:
///</summary>
[SugarColumn(ColumnName = "warehouseCode", ColumnDescription = "浠撳簱")]
public string? WarehouseCode { get; set; }
+
+ /// <summary>
+ /// 鍥炰紶MES
+ /// </summary>
+ [SugarColumn(IsNullable = true, ColumnDescription = "鍥炰紶MES")]
+ public int ReturnToMESStatus { get; set; } = 0;
/// <summary>
/// 澶囨敞
/// </summary>
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/OutStockLockInfoService.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/OutStockLockInfoService.cs"
index ba2016e..0e84c80 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/OutStockLockInfoService.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/OutStockLockInfoService.cs"
@@ -217,7 +217,10 @@
}
}
-
+ public List<Dt_OutStockLockInfo> GetByOrderDetailId(int orderDetailId, OutLockStockStatusEnum? outStockStatus)
+ {
+ return BaseDal.QueryData(x => x.OrderDetailId == orderDetailId && outStockStatus == null ? true : x.Status == outStockStatus.ObjToInt());
+ }
}
}
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/OutboundOrderDetailService.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/OutboundOrderDetailService.cs"
index bca654b..3fa61d7 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/OutboundOrderDetailService.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/OutboundOrderDetailService.cs"
@@ -67,11 +67,12 @@
// 鎸夌墿鏂欏拰鎵规鍒嗙粍澶勭悊
var groupDetails = outboundOrderDetails
- .GroupBy(x => new { x.MaterielCode, x.BatchNo })
+ .GroupBy(x => new { x.MaterielCode, x.BatchNo ,x.SupplyCode})
.Select(x => new
{
MaterielCode = x.Key.MaterielCode,
BatchNo = x.Key.BatchNo,
+ SupplyCode = x.Key.SupplyCode,
Details = x.ToList(),
TotalNeedQuantity = x.Sum(v => v.OrderQuantity - v.OverOutQuantity - v.LockQuantity-v.MoveQty)
})
@@ -83,7 +84,7 @@
var needQuantity = item.TotalNeedQuantity;
// 鑾峰彇鍙敤搴撳瓨锛堟寜鍏堣繘鍏堝嚭鎺掑簭锛�
- List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseableStocks(item.MaterielCode, item.BatchNo);
+ List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseableStocks(item.MaterielCode, item.BatchNo,item.SupplyCode);
if (!stockInfos.Any())
{
throw new Exception($"鐗╂枡[{item.MaterielCode}]鎵规[{item.BatchNo}]鏈壘鍒板彲鍒嗛厤搴撳瓨");
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/OutboundOrderService.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/OutboundOrderService.cs"
index 1ac7547..a7b384f 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/OutboundOrderService.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/OutboundOrderService.cs"
@@ -10,6 +10,7 @@
using WIDESEA_Core.DB;
using WIDESEA_Core.Enums;
using WIDESEA_Core.Seed;
+using WIDESEA_IBasicService;
using WIDESEA_IOutboundService;
using WIDESEA_Model.Models;
@@ -22,23 +23,24 @@
public IRepository<Dt_OutboundOrder> Repository => BaseDal;
private readonly ILogger<OutboundOrderService> _logger;
private readonly IRepository<Dt_OutboundOrderDetail> _outboundOrderDetailRepository;
-
- public OutboundOrderService(IRepository<Dt_OutboundOrder> BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IRepository<Dt_OutboundOrderDetail> outboundOrderDetailRepository, ILogger<OutboundOrderService> logger) : base(BaseDal)
+ private readonly IMaterialUnitService _materialUnitService;
+ public OutboundOrderService(IRepository<Dt_OutboundOrder> BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IRepository<Dt_OutboundOrderDetail> outboundOrderDetailRepository, ILogger<OutboundOrderService> logger, IMaterialUnitService materialUnitService) : base(BaseDal)
{
_mapper = mapper;
_unitOfWorkManage = unitOfWorkManage;
_outboundOrderDetailRepository = outboundOrderDetailRepository;
_logger = logger;
+ _materialUnitService = materialUnitService;
}
- public WebResponseContent ReceiveOutboundOrder(Dt_OutboundOrder model, int operateType)
+ public async Task<WebResponseContent> ReceiveOutboundOrder(Dt_OutboundOrder model, int operateType)
{
try
{
return operateType switch
{
- 1 => AddOutboundOrder(model),
- 2 => UpdateOutboundOrder(model),
+ 1 => await AddOutboundOrder(model),
+ 2 => await UpdateOutboundOrder(model),
3 => DeleteOutboundOrder(model),
_ => WebResponseContent.Instance.OK(),
@@ -50,7 +52,7 @@
}
}
- public WebResponseContent AddOutboundOrder(Dt_OutboundOrder model)
+ public async Task<WebResponseContent> AddOutboundOrder(Dt_OutboundOrder model)
{
try
{
@@ -59,6 +61,15 @@
{
return WebResponseContent.Instance.Error($"鍑哄簱鍗曞彿閲嶅");
}
+ foreach (var item in model.Details)
+ {
+ var issueoStockResult = await _materialUnitService.ConvertIssueToStockAsync(item.MaterielCode, item.BarcodeQty);
+ item.Unit = issueoStockResult.Unit;
+ item.OrderQuantity = issueoStockResult.Quantity;
+ var moveissueoStockResult = await _materialUnitService.ConvertIssueToStockAsync(item.MaterielCode, item.BarcodeMoveQty);
+ item.MoveQty = moveissueoStockResult.Quantity;
+ }
+
model.OrderNo = CreateCodeByRule(nameof(RuleCodeEnum.OutboundOrderRule));
Db.InsertNav(model).Include(x => x.Details).ExecuteCommand();
@@ -70,7 +81,7 @@
return WebResponseContent.Instance.Error(ex.Message);
}
}
- public WebResponseContent UpdateOutboundOrder(Dt_OutboundOrder model)
+ public async Task<WebResponseContent> UpdateOutboundOrder(Dt_OutboundOrder model)
{
try
{
@@ -84,8 +95,8 @@
{
return WebResponseContent.Instance.Error($"鏈壘鍒板嚭搴撳崟鏄庣粏淇℃伅");
}
- List<Dt_OutboundOrderDetail> inboundOrderDetails = new List<Dt_OutboundOrderDetail>();
- List<Dt_OutboundOrderDetail> updateInboundOrderDetails = new List<Dt_OutboundOrderDetail>();
+ List<Dt_OutboundOrderDetail> outboundOrderDetails = new List<Dt_OutboundOrderDetail>();
+ List<Dt_OutboundOrderDetail> updateoutboundOrderDetails = new List<Dt_OutboundOrderDetail>();
List<int> detailIds = new List<int>();
foreach (var item in model.Details)
{
@@ -102,10 +113,19 @@
BatchNo = item.BatchNo,
Unit = item.Unit,
WarehouseCode = item.WarehouseCode,
- MoveQty=item.MoveQty,
- OrderQuantity = item.OrderQuantity
+ MoveQty = item.MoveQty,
+ OrderQuantity = item.OrderQuantity,
+ BarcodeMoveQty = item.MoveQty,
+ BarcodeQty = item.OrderQuantity,
+ BarcodeUnit = item.Unit,
};
- inboundOrderDetails.Add(outboundOrderDetail);
+ var issueoStockResult = await _materialUnitService.ConvertIssueToStockAsync(item.MaterielCode, item.BarcodeQty);
+ item.Unit = issueoStockResult.Unit;
+ item.OrderQuantity = issueoStockResult.Quantity;
+ var moveissueoStockResult = await _materialUnitService.ConvertIssueToStockAsync(item.MaterielCode, item.BarcodeMoveQty);
+ item.MoveQty = moveissueoStockResult.Quantity;
+
+ outboundOrderDetails.Add(outboundOrderDetail);
}
else
{
@@ -117,8 +137,17 @@
outboundOrderDetail.WarehouseCode = item.WarehouseCode;
outboundOrderDetail.MoveQty = item.MoveQty;
outboundOrderDetail.OrderQuantity = item.OrderQuantity;
+ outboundOrderDetail.BarcodeMoveQty = item.MoveQty;
+ outboundOrderDetail.BarcodeQty = item.OrderQuantity;
+ outboundOrderDetail.BarcodeUnit = item.Unit;
+ var issueoStockResult = await _materialUnitService.ConvertIssueToStockAsync(item.MaterielCode, item.BarcodeQty);
+ outboundOrderDetail.Unit = issueoStockResult.Unit;
+ outboundOrderDetail.OrderQuantity = issueoStockResult.Quantity;
+ var moveissueoStockResult = await _materialUnitService.ConvertIssueToStockAsync(item.MaterielCode, item.BarcodeMoveQty);
+ outboundOrderDetail.MoveQty = moveissueoStockResult.Quantity;
- updateInboundOrderDetails.Add(outboundOrderDetail);
+
+ updateoutboundOrderDetails.Add(outboundOrderDetail);
detailIds.Add(outboundOrderDetail.Id);
}
}
@@ -137,8 +166,8 @@
_outboundOrderDetailRepository.DeleteAndMoveIntoHty(item, OperateTypeEnum.鑷姩鍒犻櫎);
}
- _outboundOrderDetailRepository.UpdateData(updateInboundOrderDetails);
- _outboundOrderDetailRepository.AddData(inboundOrderDetails);
+ _outboundOrderDetailRepository.UpdateData(updateoutboundOrderDetails);
+ _outboundOrderDetailRepository.AddData(outboundOrderDetails);
BaseDal.UpdateData(outboundOrder);
_unitOfWorkManage.CommitTran();
@@ -156,7 +185,7 @@
{
try
{
- var outboundOrder = Db.Queryable<Dt_OutboundOrder>().Where(x => x.UpperOrderNo == model.UpperOrderNo).Includes(x => x.Details).First();
+ var outboundOrder = Db.Queryable<Dt_OutboundOrder>().Where(x => x.UpperOrderNo == model.UpperOrderNo).Includes(x => x.Details).First();
if (outboundOrder == null)
{
return WebResponseContent.Instance.Error($"鏈壘鍒板嚭搴撳崟淇℃伅");
@@ -165,7 +194,7 @@
{
return WebResponseContent.Instance.Error($"鏈壘鍒板嚭搴撳崟鏄庣粏淇℃伅");
}
-
+
_unitOfWorkManage.BeginTran();
//BaseDal.DeleteAndMoveIntoHty(outboundOrder, OperateTypeEnum.鑷姩鍒犻櫎);
foreach (var item in outboundOrder.Details)
@@ -191,7 +220,7 @@
/// </summary>
public async Task<WebResponseContent> GetById(int id)
{
- var order = await Db.Queryable<Dt_OutboundOrder>().FirstAsync(o=>o.Id==id);
+ var order = await Db.Queryable<Dt_OutboundOrder>().FirstAsync(o => o.Id == id);
if (order == null)
{
return WebResponseContent.Instance.Error("鏈壘鍒板嚭搴撳崟淇℃伅");
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 a60f431..653f016 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"
@@ -288,44 +288,56 @@
var outboundOrder = _stockInfoService.Db.Queryable<Dt_OutboundOrder>().First(x => x.OrderNo == orderNo);
- if (outboundOrder != null && outboundOrder.OrderStatus == InOrderStatusEnum.鍏ュ簱瀹屾垚.ObjToInt())
+ if (outboundOrder != null && outboundOrder.OrderStatus == OutOrderStatusEnum.鍑哄簱瀹屾垚.ObjToInt())
{
- var feedmodel = new FeedbackOutboundRequestModel
+
+ if (outboundOrder.OrderType == OutOrderTypeEnum.Allocate.ObjToInt().ObjToInt())//璋冩嫧鍑哄簱
{
- reqCode = Guid.NewGuid().ToString(),
- reqTime = DateTime.Now.ToString(),
- business_type = outboundOrder.BusinessType,
- factoryArea = outboundOrder.FactoryArea,
- operationType = 1,
- Operator = outboundOrder.Operator,
- orderNo = outboundOrder.UpperOrderNo,
- status = outboundOrder.OrderStatus,
- details = new List<FeedbackOutboundDetailsModel>()
- };
- var lists = _outStockLockInfoService.Db.Queryable<Dt_OutStockLockInfo>().Where(x => x.OrderNo == orderNo).ToList();
+ }
+ else if (outboundOrder.OrderType == OutOrderTypeEnum.ReCheck.ObjToInt()) //閲嶆鍑哄簱
+ {
- var groupedData = lists.GroupBy(item => new { item.MaterielCode, item.lineNo, item.Unit, item.WarehouseCode })
- .Select(group => new FeedbackOutboundDetailsModel
- {
- materialCode = group.Key.MaterielCode,
- lineNo = group.Key.lineNo,
- warehouseCode = group.Key.WarehouseCode,
- currentDeliveryQty = group.Sum(x => x.OrderQuantity),
- // warehouseCode= "1072",
- unit = group.Key.Unit,
- barcodes = group.Select(row => new WIDESEA_DTO.Outbound.BarcodesModel
+ }
+ else
+ {
+ var feedmodel = new FeedbackOutboundRequestModel
+ {
+ reqCode = Guid.NewGuid().ToString(),
+ reqTime = DateTime.Now.ToString(),
+ business_type = outboundOrder.BusinessType,
+ factoryArea = outboundOrder.FactoryArea,
+ operationType = 1,
+ Operator = outboundOrder.Operator,
+ orderNo = outboundOrder.UpperOrderNo,
+ status = outboundOrder.OrderStatus,
+ details = new List<FeedbackOutboundDetailsModel>()
+
+ };
+ var lists = _outStockLockInfoService.Db.Queryable<Dt_OutStockLockInfo>().Where(x => x.OrderNo == orderNo).ToList();
+
+ var groupedData = lists.GroupBy(item => new { item.MaterielCode, item.lineNo, item.Unit, item.WarehouseCode })
+ .Select(group => new FeedbackOutboundDetailsModel
{
- barcode = row.CurrentBarcode,
- supplyCode = row.SupplyCode,
- batchNo = row.BatchNo,
- unit = row.Unit,
- qty = row.AssignQuantity
- }).ToList()
- }).ToList();
- feedmodel.details = groupedData;
+ materialCode = group.Key.MaterielCode,
+ lineNo = group.Key.lineNo,
+ warehouseCode = group.Key.WarehouseCode,
+ currentDeliveryQty = group.Sum(x => x.OrderQuantity),
+ // warehouseCode= "1072",
+ unit = group.Key.Unit,
+ barcodes = group.Select(row => new WIDESEA_DTO.Outbound.BarcodesModel
+ {
+ barcode = row.CurrentBarcode,
+ supplyCode = row.SupplyCode,
+ batchNo = row.BatchNo,
+ unit = row.Unit,
+ qty = row.AssignQuantity
+ }).ToList()
+ }).ToList();
+ feedmodel.details = groupedData;
- _invokeMESService.FeedbackOutbound(feedmodel);
+ _invokeMESService.FeedbackOutbound(feedmodel);
+ }
}
}
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_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 efe19b8..d392eb2 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"
@@ -5,7 +5,9 @@
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Helper;
+using WIDESEA_DTO.Stock;
using WIDESEA_IBasicService;
+using WIDESEA_IOutboundService;
using WIDESEA_IRecordService;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
@@ -19,14 +21,15 @@
private readonly IRecordService _recordService;
public IRepository<Dt_StockInfo> Repository => BaseDal;
private readonly IRepository<Dt_StockInfoDetail> _stockInfoDetailRepository;
-
+ private readonly IOutboundOrderService _outboundOrderService;
private readonly ILocationInfoService _locationInfoService;
- public StockInfoService(IRepository<Dt_StockInfo> BaseDal, IMapper mapper, IRepository<Dt_StockInfoDetail> stockInfoDetailRepository, IRecordService recordService, ILocationInfoService locationInfoService) : base(BaseDal)
+ public StockInfoService(IRepository<Dt_StockInfo> BaseDal, IMapper mapper, IRepository<Dt_StockInfoDetail> stockInfoDetailRepository, IRecordService recordService, ILocationInfoService locationInfoService, IOutboundOrderService outboundOrderService) : base(BaseDal)
{
_mapper = mapper;
_stockInfoDetailRepository = stockInfoDetailRepository;
_recordService = recordService;
_locationInfoService = locationInfoService;
+ _outboundOrderService = outboundOrderService;
}
/// <summary>
@@ -178,7 +181,7 @@
return await query.OrderBy(x => x.ProductionDate).ToListAsync();
}
- public List<Dt_StockInfo> GetStockInfos(string materielCode, string lotNo, List<string> locationCodes)
+ public List<Dt_StockInfo> GetStockInfos(string materielCode, string lotNo, string supplyCode, List<string> locationCodes)
{
var query = Db.Queryable<Dt_StockInfo>()
.Where(x => locationCodes.Contains(x.LocationCode)
@@ -195,20 +198,25 @@
query = query.Where(x => x.Details.Any(d => d.BatchNo == lotNo));
}
+ if (!string.IsNullOrEmpty(supplyCode))
+ {
+ query = query.Where(x => x.Details.Any(d => d.SupplyCode == supplyCode));
+ }
+
var stocks = query.ToList();
- return stocks.OrderBy(x => x.Details.Where(d => d.MaterielCode == materielCode &&
- (string.IsNullOrEmpty(lotNo) || d.BatchNo == lotNo)).Min(d => d.ProductionDate)).ToList();
+ return stocks.OrderBy(x => x.Details.Where(d => d.MaterielCode == materielCode && (string.IsNullOrEmpty(supplyCode) || d.SupplyCode == supplyCode) &&
+ (string.IsNullOrEmpty(lotNo) || d.BatchNo == lotNo)).Min(d => d.CreateDate)).ToList();
//ISugarQueryable<Dt_LocationInfo> sugarQueryable = Db.Queryable<Dt_LocationInfo>().Where(x => locationCodes.Contains(x.LocationCode));
//ISugarQueryable<Dt_StockInfo> sugarQueryable1 = Db.Queryable<Dt_StockInfo>().Includes(x => x.Details).Where(x => x.Details.Any(v => v.MaterielCode == materielCode));
//return sugarQueryable.InnerJoin(sugarQueryable1, (a, b) => a.LocationCode == b.LocationCode).Select((a, b) => b).OrderBy(a => a.CreateDate).Includes(a => a.Details).ToList();
}
- public List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo)
+ public List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo, string supplyCode)
{
List<string> locationCodes = _locationInfoService.GetCanOutLocationCodes();
- return GetStockInfos(materielCode, batchNo, locationCodes);
+ return GetStockInfos(materielCode, batchNo,supplyCode, locationCodes);
}
public Dt_StockInfo GetPalletStockInfo(int locationType)
@@ -216,5 +224,46 @@
return Db.Queryable<Dt_StockInfo>().Where(x => x.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt() && SqlFunc.Subqueryable<Dt_LocationInfo>().Where(v => v.LocationCode == x.LocationCode && v.LocationType == locationType && v.LocationStatus == LocationStatusEnum.Pallet.ObjToInt() && (v.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || EnableStatusEnum.Normal.ObjToInt() == v.EnableStatus)).Any()).OrderBy(x => x.ModifyDate).First();
}
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="orderId"></param>
+ /// <param name="materielCode"></param>
+ /// <returns></returns>
+ public List<StockSelectViewDTO> GetStockSelectViews(int orderId, string materielCode)
+ {
+ try
+ {
+ Dt_OutboundOrder outboundOrder = _outboundOrderService.Repository.QueryFirst(x => x.Id == orderId);
+ if (outboundOrder == null)
+ {
+ throw new Exception($"鏈壘鍒板嚭搴撳崟淇℃伅");
+ }
+
+ List<string> locationCodes = _locationInfoService.GetCanOutLocationCodes();
+
+ return BaseDal.QueryTabs<Dt_StockInfo, Dt_StockInfoDetail, StockSelectViewDTO>((a, b) => a.Id == b.StockId, (a, b) => new StockSelectViewDTO
+ {
+ LocationCode = a.LocationCode,
+ MaterielCode = b.MaterielCode,
+ MaterielName = b.MaterielName,
+ PalletCode = a.PalletCode,
+ UseableQuantity = b.StockQuantity - b.OutboundQuantity
+ }, a => locationCodes.Contains(a.LocationCode), b => b.StockQuantity > b.OutboundQuantity && b.MaterielCode == materielCode, x => true).GroupBy(x => x.PalletCode).Select(x => new StockSelectViewDTO
+ {
+ LocationCode = x.FirstOrDefault()?.LocationCode ?? "",
+ MaterielCode = x.FirstOrDefault()?.MaterielCode ?? "",
+ MaterielName = x.FirstOrDefault()?.MaterielName ?? "",
+ PalletCode = x.Key,
+ UseableQuantity = x.Sum(x => x.UseableQuantity)
+ }).ToList();
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
+
+ }
}
}
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/WIDESEA_StockService.csproj" "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/WIDESEA_StockService.csproj"
index 1f513d8..eb20a18 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/WIDESEA_StockService.csproj"
+++ "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/WIDESEA_StockService.csproj"
@@ -8,6 +8,7 @@
<ItemGroup>
<ProjectReference Include="..\WIDESEA_IBasicService\WIDESEA_IBasicService.csproj" />
+ <ProjectReference Include="..\WIDESEA_IOutboundService\WIDESEA_IOutboundService.csproj" />
<ProjectReference Include="..\WIDESEA_IRecordService\WIDESEA_IRecordService.csproj" />
<ProjectReference Include="..\WIDESEA_IStockService\WIDESEA_IStockService.csproj" />
</ItemGroup>
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 c8152ac..f8217d5 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"
@@ -157,7 +157,7 @@
/// </summary>
/// <param name="task"></param>
/// <returns></returns>
- public WebResponseContent InboundTaskCompleted(Dt_Task task)
+ public async Task<WebResponseContent> InboundTaskCompleted(Dt_Task task)
{
decimal beforeQuantity = 0;
@@ -248,42 +248,60 @@
{
foreach (var inboundOrder in inboundOrders)
{
- if (inboundOrder != null && inboundOrder.OrderStatus == InOrderStatusEnum.鍏ュ簱瀹屾垚.ObjToInt())
+ if (inboundOrder.OrderType == InOrderTypeEnum.Allocat.ObjToInt())//璋冩嫧鍏ュ簱
{
- var feedmodel = new FeedbackInboundRequestModel
+
+ }
+ else if (inboundOrder.OrderType == InOrderTypeEnum.ReCheck.ObjToInt()) //閲嶆鍏ュ簱
+ {
+
+ }
+ else
+ {
+ if (inboundOrder != null && inboundOrder.OrderStatus == InOrderStatusEnum.鍏ュ簱瀹屾垚.ObjToInt())
{
- 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 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 = inboundOrder.Details.GroupBy(item => new { item.MaterielCode, item.SupplyCode, item.BatchNo, item.lineNo, item.BarcodeUnit, item.WarehouseCode })
- .Select(group => new FeedbackInboundDetailsModel
- {
- materialCode = group.Key.MaterielCode,
- supplyCode = group.Key.SupplyCode,
- batchNo = group.Key.BatchNo,
- lineNo = group.Key.lineNo,
- warehouseCode = group.Key.WarehouseCode,
- qty=group.Sum(x=>x.BarcodeQty),
- // warehouseCode= "1072",
- unit = group.Key.BarcodeUnit,
- barcodes = group.Select(row => new FeedbackBarcodesModel
+ var groupedData = inboundOrder.Details.GroupBy(item => new { item.MaterielCode, item.SupplyCode, item.BatchNo, item.lineNo, item.BarcodeUnit, item.WarehouseCode })
+ .Select(group => new FeedbackInboundDetailsModel
{
- barcode = row.Barcode,
- qty = row.BarcodeQty
- }).ToList()
- }).ToList();
- feedmodel.details = groupedData;
+ materialCode = group.Key.MaterielCode,
+ supplyCode = group.Key.SupplyCode,
+ batchNo = group.Key.BatchNo,
+ lineNo = group.Key.lineNo,
+ warehouseCode = group.Key.WarehouseCode,
+ qty = group.Sum(x => x.BarcodeQty),
+ // warehouseCode= "1072",
+ unit = group.Key.BarcodeUnit,
+ barcodes = group.Select(row => new FeedbackBarcodesModel
+ {
+ barcode = row.Barcode,
+ qty = row.BarcodeQty
+ }).ToList()
+ }).ToList();
+ feedmodel.details = groupedData;
- _invokeMESService.FeedbackInbound(feedmodel);
+ var result= await _invokeMESService.FeedbackInbound(feedmodel);
+ if (result != null && result.code == 200)
+ {
+ _inboundOrderService.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 1 })
+ .Where(it => it.Id== inboundOrder.Id).ExecuteCommand();
+ _inboundOrderDetailService.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 1 })
+ .Where(it => it.OrderId == inboundOrder.Id).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_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 8f01911..a7d3558 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"
@@ -65,7 +65,7 @@
var newTask = new Dt_Task()
- {
+ {
CurrentAddress = stationCode,
Grade = 0,
NextAddress = stations.GetValueOrDefault(stationCode) ?? "",
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/Allocate/AllocateOrderController.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/Allocate/AllocateOrderController.cs"
index c2a1334..3a4607a 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/Allocate/AllocateOrderController.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/Allocate/AllocateOrderController.cs"
@@ -2,6 +2,7 @@
using Microsoft.AspNetCore.Mvc;
using System.Data.Common;
using System.Diagnostics.Eventing.Reader;
+using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.Attributes;
using WIDESEA_Core.BaseController;
@@ -29,7 +30,7 @@
}
[HttpPost, Route("ReceiveAllocateOrder"), MethodParamsValidate, AllowAnonymous]
- public WebResponseContent ReceiveAllocateOrder([FromBody] AllocateDto model)
+ public async Task<WebResponseContent> ReceiveAllocateOrder([FromBody] AllocateDto model)
{
Dt_AllocateOrder allocateOrder = new Dt_AllocateOrder
{
@@ -54,6 +55,7 @@
MaterielCode = detailDto.MaterialCode,
LineNo = detailDto.LineNo,
OrderQuantity = detailDto.Qty,
+ SupplyCode= barcodeDto.SupplyCode,
Unit = detailDto.Unit,
Barcode = barcodeDto.Barcode,
BatchNo = barcodeDto.BatchNo,
@@ -77,7 +79,7 @@
}
allocateOrder.Details.AddRange(allocateOrder.Details);
}
- var content = Service.ReceiveAllocateOrder(allocateOrder, model.OperationType);
+ var content =await Service.ReceiveAllocateOrder(allocateOrder, model.OperationType);
if (content.Status) return WebResponseContent.Instance.OK(200);
else return WebResponseContent.Instance.Error(content.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_WMSServer/Controllers/Outbound/OutStockLockInfoController.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/Outbound/OutStockLockInfoController.cs"
index 7fedc9b..425e555 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/Outbound/OutStockLockInfoController.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/Outbound/OutStockLockInfoController.cs"
@@ -21,14 +21,20 @@
{
}
-
- [HttpGet("getOutStockLockInfo")]
- public async Task<WebResponseContent> GetOutStockLockInfo(string orderDetailId)
+
+ [HttpGet("getOutStockLockInfo")]
+ public async Task<WebResponseContent> GetOutStockLockInfo(string orderDetailId)
{
var list = await Service.GetByOrderDetailId(orderDetailId.ObjToInt());
return WebResponseContent.Instance.OK(null, list);
}
+ [HttpPost, HttpGet, Route("GetByOrderDetailId"), AllowAnonymous]
+ public List<Dt_OutStockLockInfo> GetByOrderDetailId(int orderDetailId)
+ {
+ return Service.GetByOrderDetailId(orderDetailId, null);
+ }
+
}
}
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/Outbound/OutboundOrderController.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/Outbound/OutboundOrderController.cs"
index 7b20bf3..5df8879 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/Outbound/OutboundOrderController.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/Outbound/OutboundOrderController.cs"
@@ -3,6 +3,7 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
+using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.Attributes;
using WIDESEA_Core.BaseController;
@@ -33,7 +34,7 @@
/// <param name="model"></param>
/// <returns></returns>
[HttpPost, Route("ReceiveOutBoundOrder"), AllowAnonymous, MethodParamsValidate]
- public WebResponseContent ReceiveOutBoundOrder([FromBody] OutboundRequestModel model)
+ public async Task<WebResponseContent> ReceiveOutBoundOrder([FromBody] OutboundRequestModel model)
{
_logger.LogInformation("OutboundOrderController ReceiveOutBoundOrder: " + JsonConvert.SerializeObject(model));
Dt_OutboundOrder dt_OutboundOrder = new Dt_OutboundOrder() { Details = new List<Dt_OutboundOrderDetail>() };
@@ -48,6 +49,9 @@
Unit = detailitem.unit,
WarehouseCode = detailitem.warehouseCode,
MoveQty = detailitem.moveQty,
+ BarcodeMoveQty=detailitem.moveQty,
+ BarcodeQty=detailitem.qty,
+ BarcodeUnit=detailitem.unit,
OrderQuantity = detailitem.qty
};
dt_OutboundOrder.Details.Add(inboundOrderDetail);
@@ -57,7 +61,7 @@
dt_OutboundOrder.IsBatch = model.isBatch;
dt_OutboundOrder.FactoryArea = model.factoryArea;
- var content = Service.ReceiveOutboundOrder(dt_OutboundOrder, model.operationType);
+ var content =await Service.ReceiveOutboundOrder(dt_OutboundOrder, model.operationType);
if (content.Status) return WebResponseContent.Instance.OK(200);
else return WebResponseContent.Instance.Error(content.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_WMSServer/Controllers/Stock/StockInfoController.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/Stock/StockInfoController.cs"
index 089a068..87d98a3 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/Stock/StockInfoController.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/Stock/StockInfoController.cs"
@@ -19,7 +19,17 @@
public StockInfoController(IStockInfoService service) : base(service)
{
}
+ /// <summary>
+ /// 鏌ヨ璁㈠崟绔嬪簱搴撳瓨瑙嗗浘
+ /// </summary>
+ /// <param name="orderId"></param>
+ /// <param name="materielCode"></param>
+ /// <returns></returns>
+ [HttpPost, HttpGet, Route("GetStockSelectViews")]
+ public List<StockSelectViewDTO> GetStockSelectViews(int orderId, string materielCode)
+ {
+ return Service.GetStockSelectViews(orderId, materielCode);
+ }
-
}
}
--
Gitblit v1.9.3