|
@@ -1,25 +1,12 @@
|
|
|
using Aspose.Cells;
|
|
|
-using Aspose.Cells.Drawing;
|
|
|
-using Aspose.Words.Drawing;
|
|
|
using AutoMapper;
|
|
|
-using EyeSoft.IO;
|
|
|
-using EyeSoft.Reflection;
|
|
|
-using EyeSoft.Runtime.InteropServices;
|
|
|
using Newtonsoft.Json;
|
|
|
-using NPOI.OpenXmlFormats.Vml;
|
|
|
-using NPOI.SS.UserModel;
|
|
|
-using NPOI.Util;
|
|
|
using OASystem.Domain;
|
|
|
using OASystem.Domain.Dtos.PersonnelModule;
|
|
|
using OASystem.Domain.Entities.Groups;
|
|
|
using OASystem.Domain.Entities.PersonnelModule;
|
|
|
using OASystem.Domain.ViewModels.PersonnelModule;
|
|
|
-using OASystem.Domain.ViewModels.SmallFun;
|
|
|
using OASystem.Infrastructure.Tools;
|
|
|
-using System.Collections.Specialized;
|
|
|
-using System.Drawing;
|
|
|
-using System.IO;
|
|
|
-using System.Security.Policy;
|
|
|
|
|
|
namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
{
|
|
@@ -93,7 +80,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
.ToListAsync();
|
|
|
|
|
|
//库存状态
|
|
|
- var stockStatus = new List<dynamic>() {
|
|
|
+ var stockStatus = new List<dynamic>() {
|
|
|
new { Value = -1, Text = "全部" },
|
|
|
new { Value = 0, Text = "待确认" },
|
|
|
new { Value = 1, Text = "部分确认" },
|
|
@@ -102,7 +89,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
};
|
|
|
|
|
|
//领用出库状态
|
|
|
- var receiveStatus = new List<dynamic>() {
|
|
|
+ var receiveStatus = new List<dynamic>() {
|
|
|
new { Value = -1, Text = "全部" },
|
|
|
new { Value = GoodsAuditEnum.Pending, Text = GoodsAuditEnum.Pending.GetEnumDescription() },
|
|
|
new { Value = GoodsAuditEnum.Approved, Text = GoodsAuditEnum.Approved.GetEnumDescription() },
|
|
@@ -345,18 +332,17 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
{
|
|
|
//多部门审核类型Id
|
|
|
var goodsTypeIds = new List<int>() {
|
|
|
- 1420, //1420 贵重物品
|
|
|
+ 1423, //1423 贵重物品
|
|
|
};
|
|
|
|
|
|
if (goodsTypeIds.Contains(goodsTypeId))
|
|
|
{
|
|
|
return true;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// 物品入库列表(带审核)
|
|
|
/// </summary>
|
|
@@ -540,6 +526,25 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
_jv.Msg = $"修改失败!";
|
|
|
return _jv;
|
|
|
}
|
|
|
+
|
|
|
+ //入库确认默认状态 多条 or 单条
|
|
|
+ var auditInfos = await _sqlSugar.Queryable<Pm_GoodsAudit>().Where(x => x.Type == 1 && x.DataId == dto.Id).ToListAsync();
|
|
|
+
|
|
|
+ if (auditInfos.Any())
|
|
|
+ {
|
|
|
+ var isAuditPer = false;
|
|
|
+ var goodsInfo = await _sqlSugar.Queryable<Pm_GoodsInfo>().FirstAsync(x => x.IsDel == 0 && x.Id == dto.GoodsId);
|
|
|
+ if (goodsInfo != null)
|
|
|
+ {
|
|
|
+ isAuditPer = GoodsAuditType(goodsInfo.Type);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!isAuditPer && auditInfos.Count == 1)
|
|
|
+ {
|
|
|
+ var auditInfo = new Pm_GoodsAudit(1, GoodsAuditDepEnum.Financial, dto.Id, GoodsConfirmEnum.WaitConfirm, currUserId);
|
|
|
+ await _sqlSugar.Insertable(auditInfo).ExecuteCommandAsync();
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
else if (info.Id < 1) //添加
|
|
|
{
|
|
@@ -557,6 +562,14 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
List<Pm_GoodsAudit> auditInfos = GoodsStorageConfirm(1, storageAddId, info.CreateUserId);
|
|
|
if (auditInfos.Any())
|
|
|
{
|
|
|
+ //验证添加多条或者单条审核状态
|
|
|
+ var goodsInfo = await _sqlSugar.Queryable<Pm_GoodsInfo>().FirstAsync(x => x.IsDel == 0 && x.Id == dto.GoodsId);
|
|
|
+ if (goodsInfo != null)
|
|
|
+ {
|
|
|
+ var isAuditPer = GoodsAuditType(goodsInfo.Type);
|
|
|
+ if (!isAuditPer) auditInfos = auditInfos.Where(x => x.Dep == GoodsAuditDepEnum.Hr).ToList();
|
|
|
+ }
|
|
|
+
|
|
|
await _sqlSugar.Insertable(auditInfos).ExecuteCommandAsync();
|
|
|
}
|
|
|
}
|
|
@@ -577,7 +590,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
/// <param name="dataId">dataId</param>
|
|
|
/// <param name="currUserId">审核人</param>
|
|
|
/// <returns></returns>
|
|
|
- public List<Pm_GoodsAudit> GoodsStorageConfirm(int auditType,int dataId,int currUserId)
|
|
|
+ public List<Pm_GoodsAudit> GoodsStorageConfirm(int auditType, int dataId, int currUserId)
|
|
|
{
|
|
|
var goodsAuditList = new List<Pm_GoodsAudit>();
|
|
|
|
|
@@ -592,13 +605,13 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
/// </summary>
|
|
|
/// <param name="dto"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task<JsonView> GoodsStorageConfirmStatusChange(GoodsStorageConfirmDto dto,int currUserId)
|
|
|
+ public async Task<JsonView> GoodsStorageConfirmStatusChange(GoodsStorageConfirmDto dto, int currUserId)
|
|
|
{
|
|
|
int gsId = dto.Id;
|
|
|
var auditDep = dto.AuditDep;
|
|
|
if (gsId < 1)
|
|
|
{
|
|
|
- _jv.Msg = string.Format("{0}",MsgTips.Id);
|
|
|
+ _jv.Msg = string.Format("{0}", MsgTips.Id);
|
|
|
return _jv;
|
|
|
}
|
|
|
|
|
@@ -619,7 +632,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
//入库确认 更改审核状态
|
|
|
_sqlSugar.BeginTran();
|
|
|
|
|
|
- var info = await _sqlSugar.Queryable<Pm_GoodsStorage>().Where(x =>x.IsDel == 0 && x.Id == gsId).FirstAsync();
|
|
|
+ var info = await _sqlSugar.Queryable<Pm_GoodsStorage>().Where(x => x.IsDel == 0 && x.Id == gsId).FirstAsync();
|
|
|
if (info == null)
|
|
|
{
|
|
|
_jv.Msg = string.Format("入库信息不存在!");
|
|
@@ -661,7 +674,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
auditInfo.AuditTime = DateTime.Now;
|
|
|
|
|
|
var updStatus = await _sqlSugar.Updateable(auditInfo)
|
|
|
- .UpdateColumns(x => new {x.AuditStatus, x.AuditUserId, x.AuditTime })
|
|
|
+ .UpdateColumns(x => new { x.AuditStatus, x.AuditUserId, x.AuditTime })
|
|
|
.ExecuteCommandAsync();
|
|
|
|
|
|
if (updStatus < 1)
|
|
@@ -670,9 +683,9 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
_jv.Msg = string.Format("入库确认失败!");
|
|
|
return _jv;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
- else
|
|
|
+ else
|
|
|
{
|
|
|
auditInfo = new Pm_GoodsAudit(1, goodsAuditDep, gsId, dto.ConfirmStatus, currUserId, currUserId);
|
|
|
var addStatus = await _sqlSugar.Insertable(auditInfo).ExecuteCommandAsync();
|
|
@@ -807,7 +820,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
/// 2:出库审核
|
|
|
/// </param>
|
|
|
/// <returns></returns>
|
|
|
- public (bool, GoodsAuditDepEnum) GoodsAuditDep(int userId,GoodsAuditDepEnum auditDepEnum,int auditType = 1)
|
|
|
+ public (bool, GoodsAuditDepEnum) GoodsAuditDep(int userId, GoodsAuditDepEnum auditDepEnum, int auditType = 1)
|
|
|
{
|
|
|
if (userId < 1) return (false, GoodsAuditDepEnum.Hr);
|
|
|
|
|
@@ -841,8 +854,9 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
{
|
|
|
AuditDep = GoodsAuditDepEnum.Hr,
|
|
|
AuditorIds = new int[] {
|
|
|
+ 309, // 赖红燕
|
|
|
343, // 陈湘
|
|
|
- 374, // 罗颖
|
|
|
+ //374, // 罗颖
|
|
|
208, // 雷怡
|
|
|
}
|
|
|
};
|
|
@@ -1031,7 +1045,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
{
|
|
|
item.ReceiveLabel = string.Join("\r\n", receiveData1.Select(x => "数量:【" + x.Quantity.ToString("#0.00") + "】 申请人:【" + x.CnName + "】 申请时间:【" + x.CreateTime.ToString("yyyy-MM-dd HH:mm:ss") + "】 原因:【" + x.Reason + "】").ToList());
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
//载入模板
|
|
@@ -1123,8 +1137,6 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
.Split(',')
|
|
|
.Select(x =>
|
|
|
{
|
|
|
-
|
|
|
-
|
|
|
if (int.TryParse(x, out var id)) return id;
|
|
|
return id;
|
|
|
})
|
|
@@ -1177,6 +1189,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
GroupName = di.TeamName,
|
|
|
GoodsId = gr.GoodsId,
|
|
|
GoodsName = gi.Name,
|
|
|
+ GoodsTypeId = gi.Type,
|
|
|
GoodsType = sd.Name,
|
|
|
Quantity = gr.Quantity,
|
|
|
Unit = gi.Unit,
|
|
@@ -1229,36 +1242,31 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
_jv.Msg = $"操作成功";
|
|
|
return _jv;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//返回分页数据
|
|
|
var view = await data.ToPageListAsync(dto.PageIndex, dto.PageSize, total);
|
|
|
|
|
|
//财务人事审核权限处理
|
|
|
var auditList = GoodsStorageConfirmAuditDep(2);
|
|
|
- bool hrAuditPer = false,
|
|
|
- finAuditPer = false;
|
|
|
+ bool hrAuditPer = false;
|
|
|
var hrAuditInfo = auditList.FirstOrDefault(x => x.AuditDep == GoodsAuditDepEnum.Hr);
|
|
|
- var finAuditInfo = auditList.FirstOrDefault(x => x.AuditDep == GoodsAuditDepEnum.Financial);
|
|
|
- if (hrAuditInfo != null)
|
|
|
- {
|
|
|
- if (hrAuditInfo.AuditorIds.Any(x => x == currUserId))
|
|
|
- {
|
|
|
- hrAuditPer = true;
|
|
|
- }
|
|
|
- }
|
|
|
- if (finAuditInfo != null)
|
|
|
+
|
|
|
+ if (hrAuditInfo.AuditorIds.Any(x => x == currUserId))
|
|
|
{
|
|
|
- if (finAuditInfo.AuditorIds.Any(x => x == currUserId))
|
|
|
- {
|
|
|
- finAuditPer = true;
|
|
|
- }
|
|
|
+ hrAuditPer = true;
|
|
|
}
|
|
|
+
|
|
|
foreach (var item in view)
|
|
|
{
|
|
|
- item.AuditPers = new GoodsStorageAuditPerView[] {
|
|
|
- new (){ AuditPer = hrAuditPer, AuditDep = GoodsAuditDepEnum.Hr, ButtonText = GoodsAuditDepEnum.Hr.GetEnumDescription()},
|
|
|
- new (){ AuditPer = finAuditPer, AuditDep = GoodsAuditDepEnum.Financial, ButtonText = GoodsAuditDepEnum.Financial.GetEnumDescription()}
|
|
|
+ //默认审核验证 多条 or 单挑
|
|
|
+ var isAudit = GoodsAuditType(item.GoodsTypeId);
|
|
|
+ var auditPers = new List<GoodsStorageAuditPerView>()
|
|
|
+ {
|
|
|
+ new (){ AuditPer = true, AuditDep = GoodsAuditDepEnum.Hr, ButtonText = $"领用确认"},
|
|
|
};
|
|
|
+ if (isAudit) auditPers.Add(new() { AuditPer = hrAuditPer, AuditDep = GoodsAuditDepEnum.Hr, ButtonText = $"出库确认" });
|
|
|
+
|
|
|
+ item.AuditPers = auditPers.ToArray();
|
|
|
}
|
|
|
|
|
|
if (dto.PortType == 2 || dto.PortType == 3)
|
|
@@ -1269,7 +1277,6 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
{
|
|
|
var view1 = _mapper.Map<List<GoodsReceiveListView>>(view);
|
|
|
|
|
|
-
|
|
|
_jv.Data = view1;
|
|
|
}
|
|
|
|
|
@@ -1291,7 +1298,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
.LeftJoin<Pm_GoodsInfo>((gr, gi) => gr.GoodsId == gi.Id)
|
|
|
.LeftJoin<Sys_Users>((gr, gi, u1) => gr.AuditUserId == u1.Id)
|
|
|
.LeftJoin<Sys_Users>((gr, gi, u1, u2) => gr.CreateUserId == u2.Id)
|
|
|
- .LeftJoin<Grp_DelegationInfo>((gr, gi, u1, u2,di) => gr.GroupId == di.Id)
|
|
|
+ .LeftJoin<Grp_DelegationInfo>((gr, gi, u1, u2, di) => gr.GroupId == di.Id)
|
|
|
.Where((gr, gi, u1, u2, di) => gr.IsDel == 0)
|
|
|
.WhereIF(id > 0, (gr, gi, u1, u2, di) => gr.Id == id)
|
|
|
.Select((gr, gi, u1, u2, di) => new GoodsReceiveInfoMobileView
|
|
@@ -1348,7 +1355,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
Console.WriteLine(e);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
_jv.Code = StatusCodes.Status200OK;
|
|
|
_jv.Msg = $"操作成功";
|
|
|
if (portType == 2 || portType == 3) //移动端
|
|
@@ -1384,7 +1391,8 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
_sqlSugar.BeginTran();
|
|
|
|
|
|
//物品现有库存
|
|
|
- var stockQuantity = _sqlSugar.Queryable<Pm_GoodsInfo>().First(x => x.Id == info.GoodsId)?.StockQuantity;
|
|
|
+ var goodsInfo = _sqlSugar.Queryable<Pm_GoodsInfo>().First(x => x.Id == info.GoodsId);
|
|
|
+ var stockQuantity = goodsInfo?.StockQuantity ?? 0.00M;
|
|
|
|
|
|
//待审核 该物品数量
|
|
|
var waitAuditQuantity = await _sqlSugar.Queryable<Pm_GoodsReceive>().Where(x => x.IsDel == 0 &&
|
|
@@ -1429,6 +1437,19 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
_jv.Code = StatusCodes.Status200OK;
|
|
|
return _jv;
|
|
|
}
|
|
|
+
|
|
|
+ //验证默认审核 多条 or 单挑
|
|
|
+ var isAuditPer = GoodsAuditType(goodsInfo?.Type ?? 0);
|
|
|
+ if (!isAuditPer)
|
|
|
+ {
|
|
|
+ //出库确认默认审核状态
|
|
|
+ var goodsAuditList = new List<Pm_GoodsAudit>() {
|
|
|
+ new (2, GoodsAuditDepEnum.Hr, info.Id, GoodsConfirmEnum.WaitConfirm, currUserId),
|
|
|
+ //new (2, GoodsAuditDepEnum.Financial, add, GoodsConfirmEnum.WaitConfirm, currUserId)
|
|
|
+ };
|
|
|
+ await _sqlSugar.Insertable(goodsAuditList).ExecuteCommandAsync();
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
else if (info.Id < 1) //添加
|
|
|
{
|
|
@@ -1450,15 +1471,18 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
return _jv;
|
|
|
}
|
|
|
|
|
|
- //出库确认默认审核状态
|
|
|
- var goodsAuditList = new List<Pm_GoodsAudit>() {
|
|
|
- new Pm_GoodsAudit(2, GoodsAuditDepEnum.Hr, add, GoodsConfirmEnum.WaitConfirm, currUserId),
|
|
|
- new Pm_GoodsAudit(2, GoodsAuditDepEnum.Financial, add, GoodsConfirmEnum.WaitConfirm, currUserId)
|
|
|
- };
|
|
|
- if (goodsAuditList.Any())
|
|
|
+ //验证默认审核 多条 or 单挑
|
|
|
+ var isAuditPer = GoodsAuditType(goodsInfo?.Type ?? 0);
|
|
|
+ if (isAuditPer)
|
|
|
{
|
|
|
+ //出库确认默认审核状态
|
|
|
+ var goodsAuditList = new List<Pm_GoodsAudit>() {
|
|
|
+ new (2, GoodsAuditDepEnum.Hr, add, GoodsConfirmEnum.WaitConfirm, currUserId),
|
|
|
+ //new (2, GoodsAuditDepEnum.Financial, add, GoodsConfirmEnum.WaitConfirm, currUserId)
|
|
|
+ };
|
|
|
await _sqlSugar.Insertable(goodsAuditList).ExecuteCommandAsync();
|
|
|
}
|
|
|
+
|
|
|
_sqlSugar.CommitTran();
|
|
|
_jv.Msg = $"操作成功!";
|
|
|
_jv.Code = StatusCodes.Status200OK;
|
|
@@ -1518,7 +1542,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
var receiveInfo = await _sqlSugar
|
|
|
.Queryable<Pm_GoodsReceive>()
|
|
|
//.Where(x => x.IsDel == 0 && idArray.Contains(x.Id))
|
|
|
- .Where(x => x.IsDel == 0 && receiveId == x.Id )
|
|
|
+ .Where(x => x.IsDel == 0 && receiveId == x.Id)
|
|
|
.FirstAsync();
|
|
|
|
|
|
if (receiveInfo == null)
|
|
@@ -1583,7 +1607,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
/// <param name="userName"></param>
|
|
|
/// <param name="auditEnum"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task<JsonView> GoodsReceivePending(GoodsAuditEnum preChangeStatus,int receiveId, int userId, string userName, GoodsAuditEnum auditEnum)
|
|
|
+ public async Task<JsonView> GoodsReceivePending(GoodsAuditEnum preChangeStatus, int receiveId, int userId, string userName, GoodsAuditEnum auditEnum)
|
|
|
{
|
|
|
_jv.Code = StatusCodes.Status400BadRequest;
|
|
|
//领用待确认 操作范围
|
|
@@ -1631,7 +1655,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
/// <param name="userName"></param>
|
|
|
/// <param name="auditEnum"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task<JsonView> GoodsReceiveApproved(GoodsAuditEnum preChangeStatus, int receiveId, int userId,string userName, GoodsAuditEnum auditEnum)
|
|
|
+ public async Task<JsonView> GoodsReceiveApproved(GoodsAuditEnum preChangeStatus, int receiveId, int userId, string userName, GoodsAuditEnum auditEnum)
|
|
|
{
|
|
|
_jv.Code = StatusCodes.Status400BadRequest;
|
|
|
if (preChangeStatus != GoodsAuditEnum.Pending)
|
|
@@ -1806,7 +1830,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
{
|
|
|
auditEnum = GoodsAuditEnum.OutConfirming;
|
|
|
}
|
|
|
- //2.1 更改库存
|
|
|
+ //2.1 更改库存
|
|
|
var goodsInfo = await _sqlSugar.Queryable<Pm_GoodsInfo>().Where(x => x.Id == receiveInfo.GoodsId).FirstAsync();
|
|
|
goodsInfo.StockQuantity -= receiveInfo.Quantity;
|
|
|
goodsInfo.OQ_Total += receiveInfo.Quantity;
|
|
@@ -1899,7 +1923,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
{
|
|
|
AuditStatus = auditEnum,
|
|
|
StatusDesc = statusDesc1,
|
|
|
- GoodsStorageInfo= goodsStorageInfo
|
|
|
+ GoodsStorageInfo = goodsStorageInfo
|
|
|
})
|
|
|
.Where(x => x.Id == receiveInfo.Id)
|
|
|
.ExecuteCommandAsync();
|
|
@@ -1920,7 +1944,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
/// <param name="depEnum"></param>
|
|
|
/// <param name="auditEnum"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task<JsonView> GoodsReceiveOutConfirming(Pm_GoodsReceive receiveInfo, int userId, GoodsAuditDepEnum depEnum,GoodsAuditEnum auditEnum)
|
|
|
+ public async Task<JsonView> GoodsReceiveOutConfirming(Pm_GoodsReceive receiveInfo, int userId, GoodsAuditDepEnum depEnum, GoodsAuditEnum auditEnum)
|
|
|
{
|
|
|
_jv.Code = StatusCodes.Status400BadRequest;
|
|
|
|
|
@@ -1935,7 +1959,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
|
|
|
var currUserOpDt = DateTime.Now;
|
|
|
var currUserOpTime = currUserOpDt.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
-
|
|
|
+
|
|
|
var auditInfos = await _sqlSugar.Queryable<Pm_GoodsAudit>()
|
|
|
.Where(x => x.IsDel == 0 && x.DataId == receiveInfo.Id && x.Type == 2)
|
|
|
.ToListAsync();
|
|
@@ -1985,7 +2009,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
}
|
|
|
|
|
|
//处理状态描述
|
|
|
- StringBuilder statusDesc= new StringBuilder();
|
|
|
+ StringBuilder statusDesc = new StringBuilder();
|
|
|
|
|
|
var receiveUserName = _sqlSugar.Queryable<Sys_Users>().First(x => x.Id == receiveInfo.AuditUserId)?.CnName ?? "-";
|
|
|
string receiveStatusDesc = string.Format("{0}:状态:{1} 审核人:{2} 审核时间:{3};<br/>",
|
|
@@ -2000,7 +2024,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
statusDesc.Append(auditInfStatusDesc);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
if (preChangeStatus == auditEnum)
|
|
|
{
|
|
@@ -2089,7 +2113,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
//storageUpd.ReceiveQuantity += thisBatchReceiveQuantity;
|
|
|
batchStorageInfos.Add(storageUpd);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//2.2.1 更改批次库存
|
|
|
if (goodsReceiveInfos.Count > 0)
|
|
|
{
|
|
@@ -2151,7 +2175,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
auditEnum = GoodsAuditEnum.OutPending;
|
|
|
}
|
|
|
|
|
|
- var statusDesc1 =statusDesc.ToString();
|
|
|
+ var statusDesc1 = statusDesc.ToString();
|
|
|
|
|
|
var changeStatus = await _sqlSugar
|
|
|
.Updateable<Pm_GoodsReceive>()
|