feat: 新增库存批次和Lot查询功能,优化入库界面和报表处理
refactor: 重构SimpleReceiptIn界面,增加历史记录和自动完成功能 fix: 修复报表参数处理和SQL解码问题 perf: 优化WCS接口调用和库存计算逻辑 style: 清理无用代码和调整格式 chore: 更新数据库连接配置和调试模式设置
This commit is contained in:
1 parent
5a04ca9d59
commit
48c63bb15d
13 files changed
+361
-199
No files matched your search
@@ -67,8 +67,10 @@ namespace HHWMS.Web.Controllers
|
||||
MaterialName = x.MaterialName,
|
||||
MaterialSpec = x.MaterialSpec,
|
||||
Company = x.CompanyCode,
|
||||
Qty = x.Qty
|
||||
Batch = x.Batch,
|
||||
Qty = (int)x.Qty
|
||||
})
|
||||
.OrderByDescending(x => x.Id)
|
||||
.ToList();
|
||||
|
||||
return Json(new {
|
||||
@@ -127,7 +129,7 @@ namespace HHWMS.Web.Controllers
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public ActionResult AddInventory(string containerCode, string materialCode, string company, string sourceCode, decimal qty)
|
||||
public ActionResult AddInventory(string containerCode, string materialCode, string company, string sourceCode, decimal qty, string batch)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -135,10 +137,12 @@ namespace HHWMS.Web.Controllers
|
||||
{
|
||||
return JsonMore(null, 500, "容器编码为空!");
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(materialCode))
|
||||
{
|
||||
return JsonMore(null, 500, "物料编码为空!");
|
||||
}
|
||||
|
||||
if (qty <= 0)
|
||||
{
|
||||
return JsonMore(null, 500, "数量必须大于0!");
|
||||
@@ -172,6 +176,7 @@ namespace HHWMS.Web.Controllers
|
||||
CompanyCode = company,
|
||||
SourceCode = sourceCode,
|
||||
SupplierCode = material.SupplierCode,
|
||||
Batch = batch,
|
||||
Qty = qty,
|
||||
TaskStatus = InventoryTaskStatusEnum.Locked,
|
||||
CreateTime = DateTime.Now
|
||||
@@ -184,12 +189,15 @@ namespace HHWMS.Web.Controllers
|
||||
ZoneCode = zone.ZoneCode,
|
||||
BillType = InventoryTranType.入库,
|
||||
MaterialCode = material.MaterialCode,
|
||||
MaterialType = inventory.MaterialType,
|
||||
MaterialName = material.MaterialName,
|
||||
MaterialSpec = inventory.MaterialSpec,
|
||||
MaterialUnit = material.MaterialUnit,
|
||||
ContainerCode = container.Code,
|
||||
CompanyCode = inventory.CompanyCode,
|
||||
SourceCode = inventory.SourceCode,
|
||||
SupplierCode = inventory.SupplierCode,
|
||||
Batch = batch,
|
||||
Qty = qty,
|
||||
CreateTime = DateTime.Now,
|
||||
CreateBy = "WMS",
|
||||
@@ -200,6 +208,10 @@ namespace HHWMS.Web.Controllers
|
||||
|
||||
return JsonMore(new { Id = inventory.ID });
|
||||
}
|
||||
catch (DbUpdateException ex)
|
||||
{
|
||||
return JsonMore(null, 500, ex.InnerException?.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return JsonMore(null, 500, ex.Message);
|
||||
@@ -272,7 +284,7 @@ namespace HHWMS.Web.Controllers
|
||||
{
|
||||
var res = Wtm.CallAPI<ApiJsonResult<dynamic>>("WCSCP", "TaskAssign", HttpMethodEnum.POST, postData)
|
||||
.Result?.Data;
|
||||
|
||||
// var res = new ApiJsonResult<dynamic> { Success = true, Msg = "Success",Data = null};
|
||||
if (res.Success)
|
||||
{
|
||||
task.Status = TaskStatusEnum.已下发;
|
||||
@@ -326,6 +338,7 @@ namespace HHWMS.Web.Controllers
|
||||
CompanyCode = inventory.CompanyCode,
|
||||
SourceCode = inventory.SourceCode,
|
||||
SupplierCode = inventory.SupplierCode,
|
||||
Batch = inventory.Batch,
|
||||
Qty = inventory.Qty,
|
||||
CreateTime = DateTime.Now,
|
||||
CreateBy = "WMS",
|
||||
@@ -374,6 +387,7 @@ namespace HHWMS.Web.Controllers
|
||||
CompanyCode = inventory.CompanyCode,
|
||||
SourceCode = inventory.SourceCode,
|
||||
SupplierCode = inventory.SupplierCode,
|
||||
Batch = inventory.Batch,
|
||||
Qty = inventory.Qty,
|
||||
CreateTime = DateTime.Now,
|
||||
CreateBy = "WMS",
|
||||
@@ -393,6 +407,7 @@ namespace HHWMS.Web.Controllers
|
||||
CompanyCode = inventory.CompanyCode,
|
||||
SourceCode = inventory.SourceCode,
|
||||
SupplierCode = inventory.SupplierCode,
|
||||
Batch = inventory.Batch,
|
||||
Qty = qty,
|
||||
CreateTime = DateTime.Now,
|
||||
CreateBy = "WMS",
|
||||
|
||||
Reference in new issue
Block a user