public async Task<ActionResult> ProductivityRelation2(BasicSurveyReportViewModel paramModel, ProductivityRelationViewModel viewModel) { ViewBag.LeftMenu = Global.Report; var listRptMentorComment = await rptMentorCommentService.GetRptMentorCommentListAsync(paramModel.QuestionSn, paramModel.BizWorkSn, paramModel.BizWorkYear, "23"); foreach (var item in viewModel.CommentList) { var comment = listRptMentorComment.SingleOrDefault(i => i.DetailCd == item.DetailCd); if (comment == null) { rptMentorCommentService.Insert(ReportHelper.MakeRptMentorcomment(item, paramModel)); } else { comment.Comment = item.Comment; } } try { await rptMentorCommentService.SaveDbContextAsync(); } catch (Exception ex) { throw ex; } if (viewModel.SubmitType == "T") //임시저장 { return RedirectToAction("ProductivityRelation2", "BasicSurveyReport", new { BizWorkSn = paramModel.BizWorkSn, CompSn = paramModel.CompSn, BizWorkYear = paramModel.BizWorkYear, Status = paramModel.Status, QuestionSn = paramModel.QuestionSn }); } else { return RedirectToAction("RiskMgmtVisionStrategy", "BasicSurveyReport", new { BizWorkSn = paramModel.BizWorkSn, CompSn = paramModel.CompSn, BizWorkYear = paramModel.BizWorkYear, Status = paramModel.Status, QuestionSn = paramModel.QuestionSn }); } }
// p23 2.상품화 역량 - 역량별 검토결과 - 제품생산.판매 관계망검토 public async Task<ActionResult> ProductivityRelation2(BasicSurveyReportViewModel paramModel) { ViewBag.LeftMenu = Global.Report; ProductivityRelationViewModel viewModel = new ProductivityRelationViewModel(); //검토결과 데이터 생성 var listRptMentorComment = await rptMentorCommentService.GetRptMentorCommentListAsync(paramModel.QuestionSn, paramModel.BizWorkSn, paramModel.BizWorkYear, "23"); //레포트 체크리스트 var enumRptCheckList = await rptCheckListService.GetRptCheckListBySmallClassCd("23"); //CommentList 채우기 var CommentList = ReportHelper.MakeCommentViewModel(enumRptCheckList.Where(cl => cl.Type == "C"), listRptMentorComment.Where(rmc => rmc.RptCheckList.Type == "C").ToList()); //SCP 입력값 가져오는 로직 있어야함(테이블도 생성해야함) viewModel.CommentList = CommentList; ViewBag.paramModel = paramModel; return View(viewModel); }