|
|
@@ -1391,13 +1391,13 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
public async Task<Result> SetNodeInfoAsync(ConfProcessSetActualDoneDto dto)
|
|
|
{
|
|
|
//参与人验证
|
|
|
- if (dto.Participators?.Count < 1)
|
|
|
- {
|
|
|
- throw new BusinessException("参与人不能为空。");
|
|
|
- }
|
|
|
+ if (dto.Participators?.Any() != true) throw new BusinessException("参与人不能为空。");
|
|
|
|
|
|
- int nodeId = dto.NodeId;
|
|
|
var isDtNul = DateTime.TryParse(dto.ActualDone, out DateTime actualDone);
|
|
|
+
|
|
|
+ if (!isDtNul) throw new BusinessException("实际操作时间为空或者格式不对。");
|
|
|
+
|
|
|
+ int nodeId = dto.NodeId;
|
|
|
int currUserId = dto.CurrUserId;
|
|
|
bool isFileUp = dto.IsFileUp;
|
|
|
|
|
|
@@ -1420,7 +1420,9 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
OverallStatus = node.OverallStatus,
|
|
|
Operator = node.Operator,
|
|
|
OperationTime = node.OperationTime,
|
|
|
- IsCurrent = node.IsCurrent
|
|
|
+ IsCurrent = node.IsCurrent,
|
|
|
+ IsFileUp = node.IsFileUp,
|
|
|
+ Participator = node.Participator,
|
|
|
};
|
|
|
|
|
|
if (isDtNul)
|
|
|
@@ -1429,13 +1431,13 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
}
|
|
|
|
|
|
node.IsFileUp = isFileUp;
|
|
|
- node.Participator = JsonConvert.SerializeObject(node.Participators);
|
|
|
+ node.Participator = JsonConvert.SerializeObject(dto.Participators);
|
|
|
|
|
|
// 3. 保存节点更新
|
|
|
await _sqlSugar.Updateable(node)
|
|
|
.UpdateColumns(n => new
|
|
|
{
|
|
|
- ActualDone = isDtNul ? node.ActualDone : null,
|
|
|
+ n.ActualDone,
|
|
|
n.Participator,
|
|
|
n.IsFileUp,
|
|
|
})
|