backend/Magic.FlowCenter/Flowscheme/FlcFlowschemeService.cs

(开头部分) 12KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using Furion.DependencyInjection;
using Furion.DynamicApiController;
using Furion.FriendlyException;
using Magic.Core;
using Magic.Core.Entity;
using Magic.Core.Service;
using Magic.FlowCenter.Entity;
using Mapster;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Magic.FlowCenter.Service;

/// <summary>
/// 流程管理服务
/// </summary>
[ApiDescriptionSettings("FlowCenter", Name = "Flowscheme", Order = 100)]
public class FlcFlowschemeService : IFlcFlowschemeService, IDynamicApiController, ITransient
{
    private readonly SqlSugarRepository<FlcFlowscheme> _rep;
    private readonly IFlcFormManageService _flcFormService;
    private readonly ISysEmpService _sysEmpService;

    public FlcFlowschemeService(SqlSugarRepository<FlcFlowscheme> flcFormRep,
                        IFlcFormManageService flcFormService,
                         ISysEmpService sysEmpService)
    {
        _rep = flcFormRep;
        _flcFormService = flcFormService;
        _sysEmpService = sysEmpService;
    }

    /// <summary>
    /// 分页查询流程管理
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    [HttpGet("/flcFlowscheme/page")]
    public async Task<dynamic> Page([FromQuery] PageFlcFlowschemeInput input)
    {
        var entities = await _rep.AsQueryable()
            .LeftJoin<FlcForm>((u,b)=>u.FrmId==b.Id)
                                    .WhereIF(!string.IsNullOrWhiteSpace(input.SchemeName), u => u.SchemeName.Contains(input.SchemeName.Trim()))
                                   .WhereIF(!string.IsNullOrWhiteSpace(input.Id), u => u.Id == long.Parse(input.Id.Trim()))
                                   .WhereIF(!string.IsNullOrWhiteSpace(input.OrgId), u => u.OrgId == long.Parse(input.OrgId) || u.OrgId == null || u.OrgId == 0)
                                    .WhereIF(input.Status != null, u => u.Status == input.Status)
                                   .Where(u => u.Status != CommonStatus.DELETED)
                                   .OrderBy(u => u.Sort)
                                   .Select<FlcFlowschemeOutput>((u,b)=>new FlcFlowschemeOutput { 
                                        Id=u.Id.ToString(),
                                        Active=u.Active,
                                        AuthorizeType=u.AuthorizeType,
                                        FrmId=u.FrmId.ToString(),
                                        Name=b.Name,
                                        WebId = b.WebId,
                                        FrmType =u.FrmType,
                                        OrgId=u.OrgId.ToString(),
后面还有 210 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。