From 97aa4f0b37b32ae0c9a062e2ec14aceba40785d6 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期二, 15 三月 2022 15:26:08 +0800 Subject: [PATCH] 初始化投诉书 --- zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 50 insertions(+), 7 deletions(-) diff --git a/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs b/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs index 90534e2..6747a39 100644 --- a/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs @@ -1612,13 +1612,7 @@ actionEntity.PageIco = "fa fa-search"; actionEntity.ActionName = "鏌ヨ"; actionlist.Add(actionEntity); - ActionEntity actionEntity1 = new ActionEntity(); - actionEntity1.OpenType = 0; - actionEntity1.ActionUrl = ""; - actionEntity1.ActionFun = "Add"; - actionEntity1.PageIco = "fa fa-plus"; - actionEntity1.ActionName = "鏂板"; - actionlist.Add(actionEntity1); + ViewData["ActionInfo"] = actionlist; ViewBag.status = _liaotianService.GetSYScode("t_challengeletter", "status").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList(); @@ -2262,8 +2256,57 @@ complaintletterDTO.complaintGongyingshangDTOs = new List<TComplaintGongyingshangDTO>()/* { new TComplaintGongyingshangDTO() }*/; } + //鍒ゆ柇鏄惁鏈夎川鐤戝嚱 + if (complaintletterDTO.Status != 2) + { + CooperOrderDTO cooperOrderDTO = _cooperOrderService.Get(complaintletterDTO.OrderId); + List<TChallengeletterDTO> challengeletterDTOs = _cooperOrderService.GetListChallengelettertousu(cooperOrderDTO.Khdw, complaintletterDTO.XmCode); + + if(challengeletterDTOs!=null&& challengeletterDTOs.Count > 0) + { + TChallengeletterDTO challengeletterDTO = challengeletterDTOs[0]; + complaintletterDTO.PurchaserName = challengeletterDTO.PurchaserName; + complaintletterDTO.ChallengeDateName = challengeletterDTO.DocumentsDate.HasValue ? challengeletterDTO.DocumentsDate.Value.ToString("yyyy-MM-dd") : ""; + complaintletterDTO.RequestInfo = challengeletterDTO.RequestInfo; + complaintletterDTO.Questioned = challengeletterDTO.PurchaserName; + complaintletterDTO.complaintShouquandaibiaoDTOs = _cooperOrderService.GetListComplaintShouquandaibiao(challengeletterDTO.Id); + if (complaintletterDTO.complaintShouquandaibiaoDTOs.Count == 0) + complaintletterDTO.complaintShouquandaibiaoDTOs = new List<TComplaintShouquandaibiaoDTO>() { new TComplaintShouquandaibiaoDTO() }; + List<TChallengeItemDTO> challengeItemDTOs = _cooperOrderService.GetListChallengeItem(challengeletterDTO.Id); + if (challengeItemDTOs.Count > 0) + { + List<TComplaintItemDTO> complaintItemDTOs = new List<TComplaintItemDTO>(); + foreach(var challengeItemDTO in challengeItemDTOs) + { + TComplaintItemDTO complaintItemDTO = new TComplaintItemDTO(); + complaintItemDTO.Id = challengeItemDTO.Id; + complaintItemDTO.ComplaintId = challengeItemDTO.ChallengeId; + complaintItemDTO.Question = challengeItemDTO.Question; + complaintItemDTO.Evidential = challengeItemDTO.Evidential; + complaintItemDTO.Law = challengeItemDTO.Law; + complaintItemDTO.Lawcoment = challengeItemDTO.Lawcoment; + complaintItemDTO.Sort = challengeItemDTO.Sort; + + complaintItemDTOs.Add(complaintItemDTO); + } + + complaintletterDTO.complaintItemDTOs = complaintItemDTOs; + foreach (var complaintItemDTO in complaintletterDTO.complaintItemDTOs) + { + var sysCodeDtls2 = sysCodeDtls1.Where(x => x.Classify1 == complaintItemDTO.Question).ToList(); + complaintItemDTO.sysCodeDtls = sysCodeDtls2; + } + } + else + { + complaintletterDTO.complaintItemDTOs = new List<TComplaintItemDTO>() { new TComplaintItemDTO() }; + complaintletterDTO.complaintItemDTOs[0].sysCodeDtls = new List<SysCodeDtl>() { new SysCodeDtl() }; + } + + } + } ViewBag.request_info = _liaotianService.GetSYScode("t_challengeletter", "request_info").OrderBy(x => x.CodeSn).ToList();//璐ㄧ枒璇锋眰 -- Gitblit v1.9.1