根据业务获取流程操作历史

dev
嵇文龙 1 month ago
parent d94c0578c1
commit d7d76c8431

@ -945,6 +945,14 @@ namespace DS.WMS.Core.Fee.Method
//}
await TenantDb.Ado.CommitTranAsync();
if (auditType != TaskBaseTypeEnum.FEE_BUSINESS_AUDIT)
{
await feeService.WriteBackStatusAsync(
auditType == TaskBaseTypeEnum.FEE_BUSINESS_AUDIT ? biz.BusinessId : fee.BusinessId,
auditType == TaskBaseTypeEnum.FEE_BUSINESS_AUDIT ? biz.BusinessType : fee.BusinessType);
}
return DataResult.Success;
}
catch (Exception ex)
@ -953,15 +961,6 @@ namespace DS.WMS.Core.Fee.Method
await ex.LogAsync(Db);
return DataResult.Failed(MultiLanguageConst.Operation_Failed);
}
finally
{
if (auditType != TaskBaseTypeEnum.FEE_BUSINESS_AUDIT)
{
await feeService.WriteBackStatusAsync(
auditType == TaskBaseTypeEnum.FEE_BUSINESS_AUDIT ? biz.BusinessId : fee.BusinessId,
auditType == TaskBaseTypeEnum.FEE_BUSINESS_AUDIT ? biz.BusinessType : fee.BusinessType);
}
}
}
}
}

@ -1131,6 +1131,10 @@ namespace DS.WMS.Core.Fee.Method
{
billFeeStatus = BillFeeStatus.PartialAudited;
}
else if (fees.Any(x => x.FeeStatus == FeeStatus.PartialSettlement || x.FeeStatus == FeeStatus.SettlementCompleted))
{
billFeeStatus = BillFeeStatus.PartialSettlement;
}
return billFeeStatus;
}

@ -138,6 +138,14 @@ public interface IClientFlowInstanceService
/// <returns></returns>
DataResult<List<FlowInstanceHistoryRes>> GetFlowInstanceHistoryList(string id);
/// <summary>
/// 获取流程操作历史
/// </summary>
/// <param name="bsId">业务ID</param>
/// <param name="bsType">bsType</param>
/// <returns></returns>
DataResult<List<FlowInstanceHistoryRes>> GetFlowInstanceHistoryList(long bsId, BusinessType? bsType);
/// <summary>
/// 获取工作流实例信息
/// </summary>

@ -36,6 +36,7 @@ public interface IFlowInstanceService
/// <param name="id"></param>
/// <returns></returns>
public DataResult StartFlowInstance(string id);
/// <summary>
/// 创建工作流实例
/// </summary>
@ -63,4 +64,5 @@ public interface IFlowInstanceService
/// <param name="id"></param>
/// <returns></returns>
DataResult<List<FlowInstanceHistoryRes>> GetFlowInstanceHistoryList(string id);
}

@ -308,6 +308,23 @@ public class FlowInstanceService : ServiceBase, IFlowInstanceService
return DataResult<List<FlowInstanceHistoryRes>>.Success(data);
}
/// <summary>
/// 获取流程操作历史
/// </summary>
/// <param name="bsId">业务ID</param>
/// <param name="bsType">bsType</param>
/// <returns></returns>
public DataResult<List<FlowInstanceHistoryRes>> GetFlowInstanceHistoryList(long bsId, BusinessType? bsType)
{
var data = Db.Queryable<FlowInstanceHistory>()
.Where(x => SqlFunc.Subqueryable<FlowInstance>().Where(y => x.InstanceId == y.Id && y.BusinessId == bsId)
.WhereIF(bsType.HasValue, y => y.BusinessType == bsType.Value)
.Any())
.Select<FlowInstanceHistoryRes>()
.ToList();
return DataResult<List<FlowInstanceHistoryRes>>.Success(data);
}
/// <summary>
/// 启动
/// </summary>

@ -560,7 +560,7 @@ public class ClientInfoService : ServiceBase, IClientInfoService
TenantDb.QueryFilter.ClearAndBackup<ISharedOrgId>();
var expr = Expressionable.Create<InfoClient>()
.And(x => x.ShortName == req.ShortName && x.Description == req.Description)
.And(x => x.ShortName == req.ShortName || x.Description == req.Description)
.AndIF(req.Id > 0, x => x.Id != req.Id);
var client = await TenantDb.Queryable<InfoClient>().Where(expr.ToExpression()).Select(x => new

@ -247,7 +247,7 @@ namespace DS.WMS.FeeApi.Controllers
if (model == null || model.Ids?.Length == 0)
return DataResult<dynamic>.Failed("参数无效", MultiLanguageConst.IllegalRequest);
string providerName = model.Value?.ToString();
string? providerName = model.Value?.ToString();
if (string.IsNullOrEmpty(providerName))
providerName = typeof(CostAccountingReport).AssemblyQualifiedName;
@ -268,5 +268,18 @@ namespace DS.WMS.FeeApi.Controllers
bool enabled = Convert.ToBoolean(model.Value);
return await _feeService.SetInvoiceEnabledAsync(enabled, model.Ids);
}
/// <summary>
/// 刷新业务表费用状态
/// </summary>
/// <param name="bsId">业务ID</param>
/// <param name="bsType">业务类型</param>
/// <returns></returns>
[HttpPost, Route("RefreshBusinessFeeStatus")]
public async Task<IActionResult> RefreshBusinessFeeStatusAsync(long bsId, BusinessType bsType)
{
await _feeService.WriteBackStatusAsync(bsId, bsType);
return Ok();
}
}
}

@ -30,7 +30,7 @@ public class ClientFlowInstanceController : ApiController
/// <param name="bsType">业务类型(可空)</param>
/// <returns></returns>
[HttpGet, Route("IsLastMarker")]
public DataResult<bool> IsLastMarker([FromQuery]TaskBaseTypeEnum taskType, [FromQuery] long bsId, [FromQuery] BusinessType? bsType)
public DataResult<bool> IsLastMarker([FromQuery] TaskBaseTypeEnum taskType, [FromQuery] long bsId, [FromQuery] BusinessType? bsType)
{
return _invokeService.IsLastMarker(taskType, bsId, bsType);
}
@ -118,14 +118,25 @@ public class ClientFlowInstanceController : ApiController
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetFlowInstanceHistoryList")]
[HttpGet, Route("GetFlowInstanceHistoryList"), Obsolete]
public DataResult<List<FlowInstanceHistoryRes>> GetFlowInstanceHistoryList([FromQuery] string id)
{
var res = _invokeService.GetFlowInstanceHistoryList(id);
return res;
}
/// <summary>
/// 根据业务获取流程操作历史
/// </summary>
/// <param name="bsId">业务ID</param>
/// <param name="bsType">业务类型(可空)</param>
/// <returns></returns>
[HttpGet, Route("GetFlowHistoriesByBiz")]
public DataResult<List<FlowInstanceHistoryRes>> GetFlowInstanceHistoryList([FromQuery] long bsId, [FromQuery] BusinessType? bsType)
{
return _invokeService.GetFlowInstanceHistoryList(bsId, bsType);
}
/// <summary>
/// 运行回调更新
/// </summary>

Loading…
Cancel
Save