移动系统liao
2025-01-24 f4a0b32daa9e021227707bcfb70b67738bd1b000
cylsg/cylsg.Application/CyOS/CyOSBaoXiaoJingLiController.cs
@@ -1,5 +1,6 @@
using cylsg.Model.ECTEModel;
using cylsg.Model.utilityViewModel;
using cylsg.utility.Extend;
using ECTESTOA;
using Furion.LinqBuilder;
using Models;
@@ -42,6 +43,7 @@
            Expression<Func<OaWorkPlan, bool>> SearchList = (x) => true;
            //川印工作单
            SearchList = SearchList.And(x => x.ApprovalStatus != PlanStatusType.Uncommitted);
            SearchList = SearchList.And(x => x.MemberId == _OAServices.firmId);
            SearchList = SearchList.And(x => x.PlanType == 3);
            SearchList = SearchList.And(x => x.PlanDataType == 17);
@@ -135,6 +137,10 @@
                throw Oops.Oh("没有找到报销单");
            if ( data.ApprovalStatus != PlanStatusType.unApproval)
                throw Oops.Oh("报销单已经批复完毕");
            if (data.ApprovalStatus == PlanStatusType.Uncommitted)
            {
                throw Oops.Oh("报销单未提交不可审批");
            }
            OaWorkPlanShenpi shenpi = data.OaWorkPlanShenpis.Where(x => x.ApprovalStaffId == Permissions.MemberId&&x.Buzhou==2).FirstOrDefault();
            await _SugarClient.AsTenant().BeginTranAsync();
            try
@@ -168,6 +174,17 @@
                    };
                    await _SugarClient.Insertable(shenpi).ExecuteCommandAsync();
                }
                if(!(param.RewardResult?.isPureNum()==true))
                {
                    throw Oops.Oh("科目选择错误");
                }
                //审批时可修改内容
                data.RewardResult = param.RewardResult;
                data.PlanContent = param.PlanContent;
                if(param.PlanMoney>0&&param.PlanMoney<=data.PlanMoney)
                data.PlanMoney = param.PlanMoney;
                data.ApprovalTime = DateTime.Now;
                data.ApprovalStatus = param.ApprovalStatus;