Beispiel #1
0
        public string GetAppvalProcAndOperator([FromUri] GAppvalRecordModel recordModel)
        {
            if (recordModel == null || recordModel.ProcPhid == 0)
            {
                return(DCHelper.ErrorMessage("审批流程id为空!"));
            }
            if (recordModel.PostPhid == 0)
            {
                return(DCHelper.ErrorMessage("审批岗位id为空!"));
            }

            try
            {
                //根据审批流程id查找审批流程
                GAppvalProcModel procModel = GAppvalProcService.FindSingle(recordModel.ProcPhid);
                //根据审批流程id,当前岗位的id,查找下一岗位的审批人
                GAppvalPostModel postModel = GAppvalPostService.GetNextStepOperator(procModel.PhId, recordModel.PostPhid, recordModel.RefbillPhid, recordModel.FBilltype);

                return(DataConverterHelper.SerializeObject(new {
                    Status = "success",
                    Process = procModel,
                    AppvalPost = postModel
                }));
            }
            catch (Exception e) {
                return(DCHelper.ErrorMessage(e.Message));
            }
        }
Beispiel #2
0
 public string GetAppvalPostOpers([FromUri] GAppvalPostModel gAppvalPost)
 {
     if (gAppvalPost.PhId <= 0)
     {
         throw new Exception("岗位主键参数传递不正确!");
     }
     try
     {
         var result = this.GAppvalPostService.GetAppvalPostOpers(gAppvalPost.PhId);
         return(DataConverterHelper.SerializeObject(result));
     }
     catch (Exception ex)
     {
         return(DCHelper.ErrorMessage(ex.Message));
     }
 }
Beispiel #3
0
        public string GetFirstStepOperator([FromUri] GAppvalProcModel procModel)
        {
            if (procModel == null || procModel.PhId == 0)
            {
                return(DCHelper.ErrorMessage("单据ID为空!"));
            }

            try
            {
                GAppvalPostModel postModel = GAppvalPostService.GetFirstStepOperator(procModel.PhId);

                return(DataConverterHelper.SerializeObject(new {
                    Status = "success",
                    Data = postModel
                }));
            }
            catch (Exception e) {
                return(DCHelper.ErrorMessage(e.Message));
            }
        }