public ActionResult RecheckProcessExistChk(string recheckType) { ApplyService applayService = new ApplyService(); string chk = applayService.RecheckProcessExistChk(recheckType, UserInfo.UserId); return(Json(chk, JsonRequestBehavior.AllowGet)); }
public ActionResult RecheckUserSelect() { ApplyService applayService = new ApplyService(); List <RecheckUserSelectDto> lst = applayService.RecheckUserSelect(ApplyType.流转单.ToString(), UserInfo.UserId); return(PartialView("_PartialRecheckUserSelect", lst)); }
public ActionResult RecheckListSelect(string recheckType) { ApplyService applayService = new ApplyService(); List <RecheckUserSelectDto> lst = applayService.RecheckUserSelect(recheckType, UserInfo.UserId); return(PartialView("_PartialRecheckList", lst)); }
public void OnCompleted(ExecutingContext executeContext) { //以下代码仅用于演示 //流程结束(在完成事件中可以做业务操作) ApplyService applyService = new ApplyService(); Apply model = applyService.GetInstanceByInstanceID(executeContext.Instance.InstanceID); model.STATUS = 8; applyService.Persistent(model); new PendingService().Delete(executeContext.Instance.InstanceID); }
public ActionResult ApplyCommit(string recheckUserId, Apply apply, string projectId, string applyIdexists, string seqNO, string attachArray) { ApplyService applayService = new ApplyService(); apply.InDateTime = DateTime.Now; apply.ApplyUserId = UserInfo.UserId; apply.ApplyTypeId = ApplyType.立项.ToString(); apply.ProjectId = Convert.ToInt32(projectId); int applyId = 0; if (Convert.ToInt32(applyIdexists) == 0) { applyId = applayService.ApplyCommit(apply, recheckUserId); } else { ApplyRecheckStatus status = new ApplyRecheckStatus(); status.ApplyId = Convert.ToInt32(applyIdexists); status.RecheckUserId = ((Mst_UserInfo)Session["LoginUser"]).UserId; status.RecheckStatusCode = "申请"; status.RecheckReason = apply.ApplyReason == null ? "" : apply.ApplyReason; status.SeqNO = Convert.ToInt32(seqNO); status.InDateTime = DateTime.Now; applayService.ApplyRecheckStatusUpdate(status, recheckUserId); applyId = Convert.ToInt32(applyIdexists); } MyApplyDto applyInfo = applayService.ApplySearchById(applyId.ToString()).FirstOrDefault(); ApplyEmailSend(applyInfo, recheckUserId); //保存附件 List <string> attachList = JsonConvert.DeserializeObject <List <string> >(attachArray); int fileSeqNO = 1; attachList.ForEach((string attach) => { db.ApplyFile.Add(new ApplyFile() { ApplyId = applyId, FileName = attach, InDateTime = DateTime.Now, InUserId = UserInfo.UserId, SeqNO = fileSeqNO++ }); }); db.SaveChanges(); return(Json(applyId, JsonRequestBehavior.AllowGet)); }
public ActionResult RecheckCommit(ApplyRecheckStatus applyStatus, string nextRecheckUserId) { ApplyService applayService = new ApplyService(); // 查询当前提交审核的申请,审核人的审核信息 RecheckStatusDtlDto recheckStatus = applayService.RecheckDtlSearch(applyStatus.ApplyId.ToString()).Where(x => x.SeqNO == applyStatus.SeqNO.ToString()).FirstOrDefault(); // 只有当审核人还没有审核的时候执行下面的操作,如果审核人已经审核过的话,不需要再执行 //正常情况下不会出现这样的数据,为了解决特定网络情况下导致的重复数据,所以添加了这个判断 if (string.IsNullOrEmpty(recheckStatus.RecheckStatusCode)) { MyApplyDto applyInfo = applayService.ApplySearchById(applyStatus.ApplyId.ToString()).FirstOrDefault(); if (applyStatus.RecheckStatusCode == "拒绝") { nextRecheckUserId = applayService.PreRecheckUserSearch(applyStatus.ApplyId.ToString(), UserInfo.UserId); } applyStatus.RecheckUserId = UserInfo.UserId; applyStatus.InDateTime = DateTime.Now; if (nextRecheckUserId == null) { nextRecheckUserId = ""; } applayService.ApplyRecheckStatusUpdate(applyStatus, nextRecheckUserId); if (applyStatus.RecheckStatusCode == "拒绝") { ApplyEmailSend(applyInfo, nextRecheckUserId, "拒绝"); } else { ApplyEmailSend(applyInfo, nextRecheckUserId, ""); } // 状态更新后再查询一遍,如果是完成的话则发送邮件给申请人,邮件通知已经审核完成 MyApplyDto afterUpdate = applayService.ApplySearchById(applyStatus.ApplyId.ToString()).FirstOrDefault(); if (afterUpdate.ApplyStatusCode == "完成") { ApplyEmailSend(applyInfo, nextRecheckUserId, "完成"); } } return(Json("")); }
public ActionResult RecheckListCommit(string applyStatusList, string recheckReason, string nextRecheckUserId) { ApplyService applayService = new ApplyService(); string[] applyList = new string[] { }; if (applyStatusList.Length > 0) { applyList = applyStatusList.Split(';'); } foreach (string item in applyList) { // 查询当前提交审核的申请,审核人的审核信息 RecheckStatusDtlDto recheckStatus = applayService.RecheckDtlSearch(item.Split(',')[0].ToString()).Where(x => x.SeqNO == item.Split(',')[1].ToString()).FirstOrDefault(); // 只有当审核人还没有审核的时候执行下面的操作,如果审核人已经审核过的话,不需要再执行 //正常情况下不会出现这样的数据,为了解决特定网络情况下导致的重复数据,所以添加了这个判断 if (string.IsNullOrEmpty(recheckStatus.RecheckStatusCode)) { ApplyRecheckStatus applyStatus = new ApplyRecheckStatus(); applyStatus.RecheckUserId = UserInfo.UserId; applyStatus.InDateTime = DateTime.Now; applyStatus.ApplyId = Convert.ToInt32(item.Split(',')[0]); applyStatus.SeqNO = Convert.ToInt32(item.Split(',')[1]); applyStatus.RecheckStatusCode = "同意"; applyStatus.RecheckReason = recheckReason; applayService.ApplyRecheckStatusUpdate(applyStatus, nextRecheckUserId); MyApplyDto applyInfo = applayService.ApplySearchById(applyStatus.ApplyId.ToString()).FirstOrDefault(); ApplyEmailSend(applyInfo, nextRecheckUserId, ""); // 状态更新后再查询一遍,如果是完成的话则发送邮件给申请人,邮件通知已经审核完成 MyApplyDto afterUpdate = applayService.ApplySearchById(applyStatus.ApplyId.ToString()).FirstOrDefault(); if (afterUpdate.ApplyStatusCode == "完成") { ApplyEmailSend(applyInfo, nextRecheckUserId, "完成"); } } } return(Json("")); }
public ActionResult ApplyCommit(string recheckUserId, Apply apply, string projectId, string groupId, string applyIdexists, string seqNO, string attachArray) { ApplyService applayService = new ApplyService(); apply.InDateTime = DateTime.Now; apply.ApplyUserId = UserInfo.UserId; apply.ApplyTypeId = ApplyType.结算单.ToString(); apply.ProjectId = Convert.ToInt32(groupId);// 结算单申请时ProjectId 保存为groupId int applyId = 0; if (Convert.ToInt32(applyIdexists) == 0) { applyId = applayService.ApplyCommit(apply, recheckUserId); } else { applyId = Convert.ToInt32(applyIdexists); ApplyRecheckStatus status = new ApplyRecheckStatus(); status.ApplyId = Convert.ToInt32(applyIdexists); status.RecheckUserId = ((Mst_UserInfo)Session["LoginUser"]).UserId; status.RecheckStatusCode = "申请"; status.RecheckReason = apply.ApplyReason == null ? "" : apply.ApplyReason; status.SeqNO = Convert.ToInt32(seqNO); status.InDateTime = DateTime.Now; applayService.ApplyRecheckStatusUpdate(status, recheckUserId); } applayService.ApplyDtlDelete(new ApplyDtl { ApplyId = applyId, ApplyTypeId = "结算单" }); List <SettlementGroupDtlDto> list = service.SettlementMstSearchByGroupId(projectId, groupId.ToString()).Where(x => x.SelectedChk == true).ToList(); foreach (SettlementGroupDtlDto item in list) { ApplyDtl applyDtl = new ApplyDtl() { ApplyId = applyId, ApplyContentId = Convert.ToInt32(item.SettlementId), ApplyTypeId = ApplyType.结算单.ToString(), InDateTime = DateTime.Now, InUserId = UserInfo.UserId }; // applayService.ApplyDtlSave(applyDtl); applyService.ApplyDtlSave_Settlement(applyDtl); } MyApplyDto applyInfo = applayService.ApplySearchById(applyId.ToString()).FirstOrDefault(); ApplyEmailSend(applyInfo, recheckUserId); //保存附件 List <string> attachList = JsonConvert.DeserializeObject <List <string> >(attachArray); int fileSeqNO = 1; attachList.ForEach((string attach) => { db.ApplyFile.Add(new ApplyFile() { ApplyId = applyId, FileName = attach, InDateTime = DateTime.Now, InUserId = UserInfo.UserId, SeqNO = fileSeqNO++ }); }); db.SaveChanges(); return(Json(applyId, JsonRequestBehavior.AllowGet)); }