|
@@ -1,11 +1,9 @@
|
|
using AutoMapper;
|
|
using AutoMapper;
|
|
-using EyeSoft.IO;
|
|
|
|
|
|
+using Newtonsoft.Json;
|
|
using OASystem.Domain.Dtos.PersonnelModule;
|
|
using OASystem.Domain.Dtos.PersonnelModule;
|
|
using OASystem.Domain.Entities.Groups;
|
|
using OASystem.Domain.Entities.Groups;
|
|
using OASystem.Domain.Entities.PersonnelModule;
|
|
using OASystem.Domain.Entities.PersonnelModule;
|
|
using OASystem.Domain.ViewModels.PersonnelModule;
|
|
using OASystem.Domain.ViewModels.PersonnelModule;
|
|
-using System.Drawing;
|
|
|
|
-using Newtonsoft.Json;
|
|
|
|
|
|
|
|
namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
{
|
|
{
|
|
@@ -594,7 +592,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
if (subData1.Count > 0)
|
|
if (subData1.Count > 0)
|
|
{
|
|
{
|
|
var storageIds = subData1.Select(x => x.StorageId).ToList();
|
|
var storageIds = subData1.Select(x => x.StorageId).ToList();
|
|
- var storages = await _sqlSugar.Queryable<Pm_GoodsStorage>().Where(x => x.IsDel == 0 && storageIds.Contains(x.Id)) .ToListAsync();
|
|
|
|
|
|
+ var storages = await _sqlSugar.Queryable<Pm_GoodsStorage>().Where(x => x.IsDel == 0 && storageIds.Contains(x.Id)).ToListAsync();
|
|
foreach (var item in subData1)
|
|
foreach (var item in subData1)
|
|
{
|
|
{
|
|
var storageInfo = storages.Find(x => x.Id == item.StorageId);
|
|
var storageInfo = storages.Find(x => x.Id == item.StorageId);
|
|
@@ -602,6 +600,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
{
|
|
{
|
|
subData.Add(new
|
|
subData.Add(new
|
|
{
|
|
{
|
|
|
|
+ StorageId = item.StorageId,
|
|
BatchNo = storageInfo.BatchNo,
|
|
BatchNo = storageInfo.BatchNo,
|
|
RecsiveQuantity = item.Quantity
|
|
RecsiveQuantity = item.Quantity
|
|
});
|
|
});
|
|
@@ -616,6 +615,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
_jv.Code = StatusCodes.Status200OK;
|
|
_jv.Code = StatusCodes.Status200OK;
|
|
_jv.Data = data;
|
|
_jv.Data = data;
|
|
_jv.Msg = $"操作成功";
|
|
_jv.Msg = $"操作成功";
|
|
@@ -766,8 +766,8 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
|
|
|
//3.入库批次关联领用人 更改批次库存
|
|
//3.入库批次关联领用人 更改批次库存
|
|
var goodsStorages = await _sqlSugar.Queryable<Pm_GoodsStorage>()
|
|
var goodsStorages = await _sqlSugar.Queryable<Pm_GoodsStorage>()
|
|
- .Where(x => x.IsDel == 0 &&
|
|
|
|
- x.GoodsId == currInfo.GoodsId &&
|
|
|
|
|
|
+ .Where(x => x.IsDel == 0 &&
|
|
|
|
+ x.GoodsId == currInfo.GoodsId &&
|
|
(x.Quantity - x.ReceiveQuantity) > 0
|
|
(x.Quantity - x.ReceiveQuantity) > 0
|
|
)
|
|
)
|
|
.OrderBy(x => x.CreateTime)
|
|
.OrderBy(x => x.CreateTime)
|
|
@@ -837,9 +837,6 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
return _jv;
|
|
return _jv;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 物品领用 Del
|
|
/// 物品领用 Del
|
|
/// </summary>
|
|
/// </summary>
|
|
@@ -858,7 +855,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
}
|
|
}
|
|
|
|
|
|
var edit = await _sqlSugar.Updateable<Pm_GoodsReceive>()
|
|
var edit = await _sqlSugar.Updateable<Pm_GoodsReceive>()
|
|
- .UpdateColumns(x => new Pm_GoodsReceive()
|
|
|
|
|
|
+ .SetColumns(x => new Pm_GoodsReceive()
|
|
{
|
|
{
|
|
IsDel = 1,
|
|
IsDel = 1,
|
|
DeleteUserId = currUserId,
|
|
DeleteUserId = currUserId,
|