From 696edbff3c8812e4b820f624d66a02ae6ddb1a06 Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期四, 16 四月 2026 13:40:18 +0800
Subject: [PATCH] Merge branch 'htq20251215' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu into htq20251215
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs | 76 ++++++++++++++++++++++++++-----------
1 files changed, 53 insertions(+), 23 deletions(-)
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/InboundOrderController.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/InboundOrderController.cs"
index d5dd7a6..0ca67c8 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/InboundOrderController.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/InboundOrderController.cs"
@@ -5,6 +5,7 @@
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using SqlSugar;
+using SqlSugar.Extensions;
using System.Net;
using System.Threading.Tasks;
using WIDESEA_BasicService;
@@ -43,12 +44,13 @@
private readonly ILocationInfoService _locationInfoService;
private readonly IDailySequenceService _dailySequenceService;
private readonly IMaterialUnitService _materialUnitService;
+ private readonly IRepository<Dt_MaterielInfo> _materialInfoRepository;
private readonly IOutStockLockInfoService _outStockLockInfoService;
private readonly IOutboundOrderDetailService _outboundOrderDetailService;
private readonly IRepository<Dt_Task> _taskRepository;
private readonly ITask_HtyService _task_HtyService;
private readonly ILogger<InboundOrderController> _logger;
- public InboundOrderController(IInboundOrderService service, WIDESEA_IBasicService.IErpApiService erpApiService, WIDESEA_IBasicService.IInvokeMESService invokeMESService, IESSApiService eSSApiService, IDailySequenceService dailySequenceService, ILocationInfoService locationInfoService, ILogger<InboundOrderController> logger, IMaterialUnitService materialUnitService, IInboundService inboundService, IOutStockLockInfoService outStockLockInfoService, IOutboundOrderDetailService outboundOrderDetailService, IRepository<Dt_Task> taskRepository, ITask_HtyService task_HtyService) : base(service)
+ public InboundOrderController(IInboundOrderService service, WIDESEA_IBasicService.IErpApiService erpApiService, WIDESEA_IBasicService.IInvokeMESService invokeMESService, IESSApiService eSSApiService, IDailySequenceService dailySequenceService, ILocationInfoService locationInfoService, ILogger<InboundOrderController> logger, IMaterialUnitService materialUnitService, IInboundService inboundService, IOutStockLockInfoService outStockLockInfoService, IOutboundOrderDetailService outboundOrderDetailService, IRepository<Dt_Task> taskRepository, ITask_HtyService task_HtyService, IRepository<Dt_MaterielInfo> materialInfoRepository) : base(service)
{
this.erpApiService = erpApiService;
_invokeMESService = invokeMESService;
@@ -62,11 +64,15 @@
_outboundOrderDetailService = outboundOrderDetailService;
_taskRepository = taskRepository;
_task_HtyService = task_HtyService;
+ _materialInfoRepository = materialInfoRepository;
}
[HttpPost, Route("Test"), AllowAnonymous, MethodParamsValidate]
public async Task<WebResponseContent> Test()
{
+
+ //var seq = await _dailySequenceService.GetNextSequenceAsync();
+ //var SDDD= "WSLOT" + DateTime.Now.ToString("yyyyMMdd") + seq.ToString()?.PadLeft(5, '0');
//var originalTask = _taskRepository.Db.Queryable<Dt_Task>().First();
@@ -91,23 +97,23 @@
//var ddddssss = "WSLOT" + DateTime.Now.ToString("yyyyMMddHHmmss") + ssss.ToString().PadLeft(5, '0');
//erpApiService.GetSuppliersAsync();
- erpApiService.GetMaterialUnitAsync();
+ // erpApiService.GetMaterialUnitAsync();
- var sss = await _invokeMESService.NewMaterielToMes(new WIDESEA_DTO.Basic.MaterielToMesDTO
- {
- reqTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
- reqCode = Guid.NewGuid().ToString(),
- oldmaterialCode = "b001",
- newmaterialCode = "Bar01",
- unit = "A01",
- operationType = 1,
- supplyCode = "A0001",
- batchNo = "A0002",
- materialCode = "FC00001",
- warehouseCode = "",
- factoryArea = "A01",
- qty =20,
- });
+ //var sss = await _invokeMESService.NewMaterielToMes(new WIDESEA_DTO.Basic.MaterielToMesDTO
+ //{
+ // reqTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
+ // reqCode = Guid.NewGuid().ToString(),
+ // oldmaterialCode = "b001",
+ // newmaterialCode = "Bar01",
+ // unit = "A01",
+ // operationType = 1,
+ // supplyCode = "A0001",
+ // batchNo = "A0002",
+ // materialCode = "FC00001",
+ // warehouseCode = "",
+ // factoryArea = "A01",
+ // qty =20,
+ //});
//await _eSSApiService.MoveContainerAsync(new WIDESEA_DTO.Basic.MoveContainerRequest
//{
@@ -144,7 +150,7 @@
Dt_InboundOrder dt_InboundOrder = new Dt_InboundOrder() { Details = new List<Dt_InboundOrderDetail>() };
foreach (var detailitem in item.details)
{
-
+ var materialName = _materialInfoRepository.QueryFirst(x => x.MaterielCode == detailitem.materialCode).MaterielName;
if (detailitem.barcodes != null && detailitem.barcodes.Any())
{
foreach (var barcode in detailitem.barcodes)
@@ -153,6 +159,7 @@
{
lineNo = detailitem.lineNo,
MaterielCode = detailitem.materialCode,
+ MaterielName = materialName,
SupplyCode = detailitem.supplyCode,
BatchNo = detailitem.batchNo,
Unit = detailitem.unit,
@@ -161,7 +168,9 @@
OutBoxbarcodes = barcode.outBoxbarcodes,
BarcodeUnit = barcode.unit,
BarcodeQty = barcode.qty,
- OrderQuantity = barcode.qty
+ OrderQuantity = barcode.qty,
+ Remark = detailitem.remark??"",
+
};
dt_InboundOrder.Details.Add(inboundOrderDetail);
@@ -181,6 +190,8 @@
OrderQuantity = detailitem.qty,
BarcodeUnit = detailitem.unit,
BarcodeQty = detailitem.qty,
+ MaterielName = materialName,
+ Remark = detailitem.remark??""
};
dt_InboundOrder.Details.Add(inboundOrderDetail);
}
@@ -190,7 +201,8 @@
dt_InboundOrder.BusinessType = item.business_type;
dt_InboundOrder.IsBatch = item.isBatch;
dt_InboundOrder.FactoryArea = item.factoryArea;
-
+ dt_InboundOrder.CreateType = OrderCreateTypeEnum.UpperSystemPush.ObjToInt();
+ dt_InboundOrder.IsTestMaterials = item.isTestMaterials;
inboundOrders.Add(dt_InboundOrder);
}
@@ -214,10 +226,16 @@
}
- [HttpPost, Route("UndoPalletGroup"), AllowAnonymous, MethodParamsValidate]
- public WebResponseContent UndoPalletGroup(string palletCode)
+ [HttpPost, Route("UnPalletGroupBarcode"), AllowAnonymous, MethodParamsValidate]
+ public WebResponseContent UnPalletGroupBarcode(string orderNo)
{
- return Service.UndoPalletGroup(palletCode);
+ return Service.UnPalletGroupBarcode(orderNo);
+ }
+
+ [HttpPost, Route("UndoPalletGroup"), AllowAnonymous, MethodParamsValidate]
+ public WebResponseContent UndoPalletGroup(string code)
+ {
+ return Service.UndoPalletGroup(code);
}
/// <summary>
///
@@ -245,5 +263,17 @@
return await _invokeMESService.BatchOrderFeedbackToMes(request.orderNos, request.inout);
}
+
+ [HttpPost, Route("HandCloseOrder"), AllowAnonymous, MethodParamsValidate]
+ public WebResponseContent HandCloseOrder(List<string> orderIds)
+ {
+ return Service.HandCloseOrder(orderIds);
+ }
+
+ [HttpPost, Route("GetLocationType"), AllowAnonymous, MethodParamsValidate]
+ public WebResponseContent GetLocationType(string code)
+ {
+ return Service.GetLocationType(code);
+ }
}
}
--
Gitblit v1.9.3