This commit is contained in:
2023-05-31 10:19:05 +08:00
parent 1b65a7a9e5
commit 9c621c75cd
238 changed files with 9905 additions and 4034 deletions

View File

@@ -88,8 +88,6 @@ public class FlowTaskOtherUtil
var rollBackOprtator = await _flowTaskRepository.GetTaskOperatorInfo(flowTaskParamter.flowTaskOperatorEntity.RollbackId);
if (rollBackOprtator.IsNotEmptyOrNull())
{
//rollBackOprtator.State = "0";
//await _flowTaskRepository.UpdateTaskOperator(rollBackOprtator);
rollBackOprtator.Id = SnowflakeIdHelper.NextId();
rollBackOprtator.State = "0";
rollBackOprtator.Completion = 0;
@@ -98,15 +96,6 @@ public class FlowTaskOtherUtil
rollBackOprtator.HandleTime = null;
await _flowTaskRepository.CreateTaskOperator(rollBackOprtator);
}
//else
//{
// rollBackOprtator.Id = SnowflakeIdHelper.NextId();
// rollBackOprtator.State = "0";
// rollBackOprtator.Completion = 0;
// rollBackOprtator.HandleStatus = 0;
// rollBackOprtator.HandleTime = null;
// await _flowTaskRepository.CreateTaskOperator(rollBackOprtator);
//}
}
flowTaskParamter.flowTaskOperatorEntity.HandleStatus = handleStatus;
flowTaskParamter.flowTaskOperatorEntity.Completion = 1;
@@ -263,7 +252,21 @@ public class FlowTaskOtherUtil
{
FlowTaskOperatorRecordEntity flowTaskOperatorRecordEntity = new FlowTaskOperatorRecordEntity();
flowTaskOperatorRecordEntity.HandleTime = DateTime.Now;
flowTaskOperatorRecordEntity.HandleId = handleStatus == 2 ? flowTaskParamter.flowTaskEntity.CreatorUserId : _userManager.UserId;
if (handleStatus == 2)
{
flowTaskOperatorRecordEntity.HandleId = flowTaskParamter.flowTaskEntity.CreatorUserId;
}
else
{
if (flowTaskParamter.flowTaskOperatorEntity.IsNotEmptyOrNull() && flowTaskParamter.flowTaskOperatorEntity.HandleId.IsNotEmptyOrNull())
{
flowTaskOperatorRecordEntity.HandleId = flowTaskParamter.flowTaskOperatorEntity.HandleId;
}
else
{
flowTaskOperatorRecordEntity.HandleId = _userManager.UserId;
}
}
flowTaskOperatorRecordEntity.HandleStatus = handleStatus;
flowTaskOperatorRecordEntity.HandleOpinion = flowTaskParamter.handleOpinion;
flowTaskOperatorRecordEntity.SignImg = flowTaskParamter.signImg;
@@ -361,15 +364,11 @@ public class FlowTaskOtherUtil
{
try
{
//modified by PhilPan
if (jobj[timeOutConfig.formField].Type == Newtonsoft.Json.Linq.JTokenType.Integer)
var value=jobj[timeOutConfig.formField].ToString();
if (!DateTime.TryParse(value, out dt))
{
dt = jobj[timeOutConfig.formField].ParseToLong().TimeStampToDateTime();
}
else
{
dt = jobj[timeOutConfig.formField].ToString().ParseToDateTime();
}
}
catch (Exception)
{