Selaa lähdekoodia

简化审核流程,添加多级确认验证

在 `GoodsRepository.cs` 文件中,添加了多级确认的验证逻辑,并在单部门审核时默认将审核部门设置为人事部。同时,移除了原有的多级审核确认的逻辑,简化了审核流程。
LEIYI 1 viikko sitten
vanhempi
commit
8d1d118a02

+ 6 - 3
OASystem/OASystem.Infrastructure/Repositories/PersonnelModule/GoodsRepository.cs

@@ -644,6 +644,12 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
 
             var preInfos = await _sqlSugar.Queryable<Pm_GoodsAudit>().Where(x => x.IsDel == 0 && x.DataId == gsId).ToListAsync();
 
+            //验证是否需要多级确认
+            var isAuditPer = GoodsAuditType(goodsTypeId);
+
+            //单部门审核时默认人事部审核
+            if (!isAuditPer) goodsAuditDep = GoodsAuditDepEnum.Hr;
+
             var auditInfo = preInfos.FirstOrDefault(x => x.Dep == goodsAuditDep);
             if (auditInfo != null)
             {
@@ -683,9 +689,6 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
             //入库确认 更改入库状态及扣或增加除库存数、金额
             var confirmStatus = GoodsConfirmEnum.WaitConfirm;
 
-            //验证是否需要多级确认
-            var isAuditPer = GoodsAuditType(goodsTypeId);
-
             if (isAuditPer) //多级审核确认
             {
                 if (preInfos.Where(x => x.AuditStatus == GoodsConfirmEnum.Confirmed).Count() >= 2)