| | |
| | | using cylsg.Model.ECTEModel; |
| | | using cylsg.Model.utilityViewModel; |
| | | using cylsg.utility.Extend; |
| | | using ECTESTOA; |
| | | using Furion.LinqBuilder; |
| | | using Models; |
| | |
| | | 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); |
| | |
| | | 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 |
| | |
| | | }; |
| | | 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&¶m.PlanMoney<=data.PlanMoney) |
| | | data.PlanMoney = param.PlanMoney; |
| | | |
| | | |
| | | |
| | | data.ApprovalTime = DateTime.Now; |
| | | data.ApprovalStatus = param.ApprovalStatus; |