| | |
| | | } |
| | | |
| | | |
| | | public IActionResult EditTousushu(string id = null) |
| | | { |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | | ViewData["curentuser"] = curentuser; |
| | | |
| | | //投诉书 |
| | | List<TComplaintletterDTO> complaintletterDTOs = _cooperOrderService.GetListComplaintletter(id); |
| | | TComplaintletterDTO complaintletterDTO = new TComplaintletterDTO(); |
| | | if (complaintletterDTOs != null && complaintletterDTOs.Count > 0) |
| | | { |
| | | complaintletterDTO = complaintletterDTOs[0]; |
| | | |
| | | if (complaintletterDTO.NoticeDate.HasValue) |
| | | { |
| | | complaintletterDTO.NoticeDateName = complaintletterDTO.NoticeDate.Value.ToString("yyyy-MM-dd"); |
| | | } |
| | | |
| | | if (complaintletterDTO.ResultnoticeDate.HasValue) |
| | | { |
| | | complaintletterDTO.ResultnoticeDateName = complaintletterDTO.ResultnoticeDate.Value.ToString("yyyy-MM-dd"); |
| | | } |
| | | |
| | | if (complaintletterDTO.ChallengeDate.HasValue) |
| | | { |
| | | complaintletterDTO.ChallengeDateName = complaintletterDTO.ChallengeDate.Value.ToString("yyyy-MM-dd"); |
| | | } |
| | | if (complaintletterDTO.RespondDate.HasValue) |
| | | { |
| | | complaintletterDTO.RespondDateName = complaintletterDTO.RespondDate.Value.ToString("yyyy-MM-dd"); |
| | | } |
| | | |
| | | |
| | | List<TComplaintItemDTO> complaintItemDTOs = _cooperOrderService.GetListComplaintItem(complaintletterDTO.Id); |
| | | if (complaintItemDTOs.Count > 0) |
| | | complaintletterDTO.complaintItemDTOs = complaintItemDTOs; |
| | | else |
| | | complaintletterDTO.complaintItemDTOs = new List<TComplaintItemDTO>() { new TComplaintItemDTO() }; |
| | | |
| | | List<TComplaintRespondentDTO> complaintRespondentDTOs = _cooperOrderService.GetListComplaintRespondent(complaintletterDTO.Id); |
| | | if (complaintRespondentDTOs.Count > 0) |
| | | complaintletterDTO.complaintRespondentDTOs = complaintRespondentDTOs; |
| | | else |
| | | complaintletterDTO.complaintRespondentDTOs = new List<TComplaintRespondentDTO>() { new TComplaintRespondentDTO() }; |
| | | |
| | | List<TComplaintShouquandaibiaoDTO> complaintShouquandaibiaoDTOs = _cooperOrderService.GetListComplaintShouquandaibiao(complaintletterDTO.Id); |
| | | if (complaintShouquandaibiaoDTOs.Count > 0) |
| | | complaintletterDTO.complaintShouquandaibiaoDTOs = complaintShouquandaibiaoDTOs; |
| | | else |
| | | complaintletterDTO.complaintShouquandaibiaoDTOs = new List<TComplaintShouquandaibiaoDTO>() { new TComplaintShouquandaibiaoDTO() }; |
| | | |
| | | List<TComplaintGongyingshangDTO> complaintGongyingshangDTOs = _cooperOrderService.GetListComplaintGongyingshang(complaintletterDTO.Id); |
| | | if (complaintGongyingshangDTOs.Count > 0) |
| | | complaintletterDTO.complaintGongyingshangDTOs = complaintGongyingshangDTOs; |
| | | else |
| | | complaintletterDTO.complaintGongyingshangDTOs = new List<TComplaintGongyingshangDTO>() { new TComplaintGongyingshangDTO() }; |
| | | |
| | | } |
| | | else |
| | | { |
| | | complaintletterDTO.complaintItemDTOs = new List<TComplaintItemDTO>() { new TComplaintItemDTO() }; |
| | | complaintletterDTO.complaintRespondentDTOs = new List<TComplaintRespondentDTO>() { new TComplaintRespondentDTO() }; |
| | | complaintletterDTO.complaintShouquandaibiaoDTOs = new List<TComplaintShouquandaibiaoDTO>() { new TComplaintShouquandaibiaoDTO() }; |
| | | complaintletterDTO.complaintGongyingshangDTOs = new List<TComplaintGongyingshangDTO>() { new TComplaintGongyingshangDTO() }; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | ViewBag.request_info = _liaotianService.GetSYScode("t_challengeletter", "request_info");//质疑请求 |
| | | ViewBag.question = _liaotianService.GetSYScode("t_challenge_items", "question"); // 质疑事项 |
| | | var sysCodeDtls = _liaotianService.GetSYScode("expert_test_topicjiexi", "falv");//法律 |
| | | var sysCodeDtls1 = _liaotianService.GetSYScode("t_complaint_items", "law");//法律依据 |
| | | |
| | | foreach (var sysCodeDtl in sysCodeDtls1) |
| | | { |
| | | var sysCodeDtl1 = sysCodeDtls.Where(x => x.CodeSn == sysCodeDtl.Comments).FirstOrDefault(); |
| | | if (sysCodeDtl1 != null) |
| | | sysCodeDtl.Comments = sysCodeDtl1.Comments; |
| | | } |
| | | |
| | | ViewBag.law = sysCodeDtls1;//法律依据 |
| | | |
| | | ViewBag.shifou = _liaotianService.GetSYScode("system", "shifou"); |
| | | |
| | | |
| | | |
| | | ViewData.Model = complaintletterDTO; |
| | | return View(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 保存 |
| | | /// </summary> |
| | | /// <param name="data">岗位实体类对象</param> |
| | | /// <returns></returns> |
| | | /// |
| | | [CheckLogin] |
| | | [HttpPost] |
| | | public IActionResult SaveComplaintletter(CooperOrderDTO data) |
| | | { |
| | | ResultEntity resultEntity = new ResultEntity(); |
| | | |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | | ViewData["curentuser"] = curentuser; |
| | | |
| | | |
| | | using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, |
| | | new TransactionOptions |
| | | { |
| | | IsolationLevel = IsolationLevel.ReadCommitted, |
| | | Timeout = TransactionManager.MaximumTimeout |
| | | } |
| | | )) |
| | | { |
| | | |
| | | |
| | | |
| | | |
| | | //查询主表 |
| | | var complaintletterDTO = _cooperOrderService.GetListComplaintletter(data.OrderId).FirstOrDefault(); |
| | | if (complaintletterDTO != null) |
| | | { |
| | | complaintletterDTO.TsrName = data.TsrName; |
| | | complaintletterDTO.TsrAddress = data.TsrAddress; |
| | | complaintletterDTO.TsrPostcode = data.TsrPostcode; |
| | | complaintletterDTO.TsrCorporation = data.TsrCorporation; |
| | | complaintletterDTO.TsrPhone = data.TsrPhone; |
| | | |
| | | |
| | | |
| | | complaintletterDTO.XmName = data.tousuXmName; |
| | | complaintletterDTO.XmCode = data.tousuXmCode; |
| | | complaintletterDTO.XmPackage = data.tousuXmPackage; |
| | | complaintletterDTO.PurchaserName = data.tousuPurchaserName; |
| | | complaintletterDTO.Agency = data.tousuAgency; |
| | | |
| | | complaintletterDTO.IsNotice = data.tousuIsNotice; |
| | | complaintletterDTO.NoticeDate = data.tousuNoticeDate; |
| | | complaintletterDTO.IsResultnotice = data.tousuIsResultnotice; |
| | | complaintletterDTO.ResultnoticeDate = data.tousuResultnoticeDate; |
| | | complaintletterDTO.ChallengeDate = data.tousuChallengeDate; |
| | | complaintletterDTO.Questioned = data.tousuQuestioned; |
| | | complaintletterDTO.Respondent = data.Respondent; |
| | | complaintletterDTO.RespondDate = data.tousuRespondDate; |
| | | |
| | | |
| | | complaintletterDTO.Modifier = curentuser.Id; |
| | | complaintletterDTO.Modifytime = DateTime.Now; |
| | | complaintletterDTO.Status = 2; |
| | | complaintletterDTO.RequestInfo = data.RequestInfo; |
| | | complaintletterDTO.PrintNum = data.PrintNum; |
| | | resultEntity = _cooperOrderService.saveComplaintletter(complaintletterDTO); |
| | | } |
| | | else |
| | | { |
| | | complaintletterDTO = new TComplaintletterDTO(); |
| | | complaintletterDTO.OrderId = data.Id; |
| | | |
| | | complaintletterDTO.TsrName = data.TsrName; |
| | | complaintletterDTO.TsrAddress = data.TsrAddress; |
| | | complaintletterDTO.TsrPostcode = data.TsrPostcode; |
| | | complaintletterDTO.TsrCorporation = data.TsrCorporation; |
| | | complaintletterDTO.TsrPhone = data.TsrPhone; |
| | | |
| | | |
| | | |
| | | complaintletterDTO.XmName = data.tousuXmName; |
| | | complaintletterDTO.XmCode = data.tousuXmCode; |
| | | complaintletterDTO.XmPackage = data.tousuXmPackage; |
| | | complaintletterDTO.PurchaserName = data.tousuPurchaserName; |
| | | complaintletterDTO.Agency = data.tousuAgency; |
| | | |
| | | complaintletterDTO.IsNotice = data.tousuIsNotice; |
| | | complaintletterDTO.NoticeDate = data.tousuNoticeDate; |
| | | complaintletterDTO.IsResultnotice = data.tousuIsResultnotice; |
| | | complaintletterDTO.ResultnoticeDate = data.tousuResultnoticeDate; |
| | | complaintletterDTO.ChallengeDate = data.tousuChallengeDate; |
| | | complaintletterDTO.Questioned = data.tousuQuestioned; |
| | | complaintletterDTO.Respondent = data.Respondent; |
| | | complaintletterDTO.RespondDate = data.tousuRespondDate; |
| | | |
| | | |
| | | complaintletterDTO.Modifier = curentuser.Id; |
| | | complaintletterDTO.Modifytime = DateTime.Now; |
| | | complaintletterDTO.Creater = curentuser.Id; |
| | | complaintletterDTO.Createtime = complaintletterDTO.Modifytime; |
| | | complaintletterDTO.Status = 2; |
| | | complaintletterDTO.RequestInfo = data.RequestInfo; |
| | | complaintletterDTO.PrintNum = data.PrintNum; |
| | | resultEntity = _cooperOrderService.saveComplaintletter(complaintletterDTO); |
| | | } |
| | | |
| | | |
| | | |
| | | resultEntity = _cooperOrderService.deleteComplaintShouquandaibiao(complaintletterDTO.Id); |
| | | if (data.tousuShouquandaibiao != null && data.tousuShouquandaibiao.Length > 0) |
| | | { |
| | | for (int i = 0; i < data.tousuShouquandaibiao.Length; i++) |
| | | { |
| | | if (!(string.IsNullOrEmpty(data.tousuShouquandaibiao[i]) |
| | | && string.IsNullOrEmpty(data.tousuLianxidianhua[i]) |
| | | && string.IsNullOrEmpty(data.tousuDizhi[i]) |
| | | && string.IsNullOrEmpty(data.tousuYoubian[i]))) |
| | | { |
| | | var complaintShouquandaibiaoDTO = new TComplaintShouquandaibiaoDTO(); |
| | | complaintShouquandaibiaoDTO.ComplaintId = complaintletterDTO.Id; |
| | | complaintShouquandaibiaoDTO.Shouquandaibiao = data.tousuShouquandaibiao[i]; |
| | | complaintShouquandaibiaoDTO.Lianxidianhua = data.tousuLianxidianhua[i]; |
| | | complaintShouquandaibiaoDTO.Dizhi = data.tousuDizhi[i]; |
| | | complaintShouquandaibiaoDTO.Youbian = data.tousuYoubian[i]; |
| | | complaintShouquandaibiaoDTO.Sort = i; |
| | | resultEntity = _cooperOrderService.saveComplaintShouquandaibiao(complaintShouquandaibiaoDTO); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | resultEntity = _cooperOrderService.deleteComplaintRespondent(complaintletterDTO.Id); |
| | | if (data.tousuRespondent != null && data.tousuRespondent.Length > 0) |
| | | { |
| | | for (int i = 0; i < data.tousuRespondent.Length; i++) |
| | | { |
| | | if (!(string.IsNullOrEmpty(data.tousuRespondent[i]) |
| | | && string.IsNullOrEmpty(data.tousuAddress[i]) |
| | | && string.IsNullOrEmpty(data.tousuPostcode[i]) |
| | | && string.IsNullOrEmpty(data.tousuContacts[i]) |
| | | && string.IsNullOrEmpty(data.tousuPhone[i]))) |
| | | { |
| | | var complaintRespondentDTO = new TComplaintRespondentDTO(); |
| | | complaintRespondentDTO.ComplaintId = complaintletterDTO.Id; |
| | | complaintRespondentDTO.Respondent = data.tousuRespondent[i]; |
| | | complaintRespondentDTO.Address = data.tousuAddress[i]; |
| | | complaintRespondentDTO.Postcode = data.tousuPostcode[i]; |
| | | complaintRespondentDTO.Contacts = data.tousuContacts[i]; |
| | | complaintRespondentDTO.Phone = data.tousuPhone[i]; |
| | | complaintRespondentDTO.Sort = i; |
| | | resultEntity = _cooperOrderService.saveComplaintRespondent(complaintRespondentDTO); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | resultEntity = _cooperOrderService.deleteComplaintGongyingshang(complaintletterDTO.Id); |
| | | if (data.Gongytingshang != null && data.Gongytingshang.Length > 0) |
| | | { |
| | | for (int i = 0; i < data.Gongytingshang.Length; i++) |
| | | { |
| | | if (!(string.IsNullOrEmpty(data.Gongytingshang[i]) |
| | | && string.IsNullOrEmpty(data.gongyingshangYoubian[i]) |
| | | && string.IsNullOrEmpty(data.gongyingshangLianxiren[i]) |
| | | && string.IsNullOrEmpty(data.gongyingshangLianxidianhua[i]) |
| | | && string.IsNullOrEmpty(data.gongyingshangDizhi[i]))) |
| | | { |
| | | var complaintGongyingshangDTO = new TComplaintGongyingshangDTO(); |
| | | complaintGongyingshangDTO.ComplaintId = complaintletterDTO.Id; |
| | | complaintGongyingshangDTO.Gongytingshang = data.Gongytingshang[i]; |
| | | complaintGongyingshangDTO.Youbian = data.gongyingshangYoubian[i]; |
| | | complaintGongyingshangDTO.Lianxiren = data.gongyingshangLianxiren[i]; |
| | | complaintGongyingshangDTO.Lianxidianhua = data.gongyingshangLianxidianhua[i]; |
| | | complaintGongyingshangDTO.Dizhi = data.gongyingshangDizhi[i]; |
| | | complaintGongyingshangDTO.Sort = i; |
| | | resultEntity = _cooperOrderService.saveComplaintGongyingshang(complaintGongyingshangDTO); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | resultEntity = _cooperOrderService.deleteComplaintItem(complaintletterDTO.Id); |
| | | if (data.Question != null && data.Question.Length > 0) |
| | | { |
| | | for (int i = 0; i < data.Question.Length; i++) |
| | | { |
| | | if (!(string.IsNullOrEmpty(data.Question[i]) |
| | | && string.IsNullOrEmpty(data.Evidential[i]) |
| | | && string.IsNullOrEmpty(data.Law[i]) |
| | | && string.IsNullOrEmpty(data.Lawcoment[i]))) |
| | | { |
| | | var complaintItemDTO = new TComplaintItemDTO(); |
| | | complaintItemDTO.ComplaintId = complaintletterDTO.Id; |
| | | complaintItemDTO.Question = data.Question[i]; |
| | | complaintItemDTO.Evidential = data.Evidential[i]; |
| | | complaintItemDTO.Law = data.Law[i]; |
| | | complaintItemDTO.Lawcoment = data.Lawcoment[i]; |
| | | complaintItemDTO.Sort = i; |
| | | resultEntity = _cooperOrderService.saveComplaintItem(complaintItemDTO); |
| | | } |
| | | |
| | | } |
| | | } |
| | | scope.Complete(); |
| | | } |
| | | |
| | | |
| | | return new JsonResult(resultEntity); |
| | | } |
| | | |
| | | |
| | | |
| | | public IActionResult Printtousushu(string id = null) |
| | | { |
| | | var curentuser = JsonConvert.DeserializeObject<PltUser>(HttpContext.Session.GetString("User")); |
| | | ViewData["curentuser"] = curentuser; |
| | | |
| | | //投诉书 |
| | | List<TComplaintletterDTO> complaintletterDTOs = _cooperOrderService.GetListComplaintletter(id); |
| | | TComplaintletterDTO complaintletterDTO = new TComplaintletterDTO(); |
| | | if (complaintletterDTOs != null && complaintletterDTOs.Count > 0) |
| | | { |
| | | complaintletterDTO = complaintletterDTOs[0]; |
| | | |
| | | if (complaintletterDTO.NoticeDate.HasValue) |
| | | { |
| | | complaintletterDTO.NoticeDateName = complaintletterDTO.NoticeDate.Value.ToString("yyyy-MM-dd"); |
| | | } |
| | | |
| | | if (complaintletterDTO.ResultnoticeDate.HasValue) |
| | | { |
| | | complaintletterDTO.ResultnoticeDateName = complaintletterDTO.ResultnoticeDate.Value.ToString("yyyy-MM-dd"); |
| | | } |
| | | |
| | | if (complaintletterDTO.ChallengeDate.HasValue) |
| | | { |
| | | complaintletterDTO.ChallengeDateName = complaintletterDTO.ChallengeDate.Value.ToString("yyyy-MM-dd"); |
| | | } |
| | | if (complaintletterDTO.RespondDate.HasValue) |
| | | { |
| | | complaintletterDTO.RespondDateName = complaintletterDTO.RespondDate.Value.ToString("yyyy-MM-dd"); |
| | | } |
| | | |
| | | |
| | | List<TComplaintItemDTO> complaintItemDTOs = _cooperOrderService.GetListComplaintItem(complaintletterDTO.Id); |
| | | if (complaintItemDTOs.Count > 0) |
| | | complaintletterDTO.complaintItemDTOs = complaintItemDTOs; |
| | | else |
| | | complaintletterDTO.complaintItemDTOs = new List<TComplaintItemDTO>() { new TComplaintItemDTO() }; |
| | | |
| | | List<TComplaintRespondentDTO> complaintRespondentDTOs = _cooperOrderService.GetListComplaintRespondent(complaintletterDTO.Id); |
| | | if (complaintRespondentDTOs.Count > 0) |
| | | complaintletterDTO.complaintRespondentDTOs = complaintRespondentDTOs; |
| | | else |
| | | complaintletterDTO.complaintRespondentDTOs = new List<TComplaintRespondentDTO>() { new TComplaintRespondentDTO() }; |
| | | |
| | | List<TComplaintShouquandaibiaoDTO> complaintShouquandaibiaoDTOs = _cooperOrderService.GetListComplaintShouquandaibiao(complaintletterDTO.Id); |
| | | if (complaintShouquandaibiaoDTOs.Count > 0) |
| | | complaintletterDTO.complaintShouquandaibiaoDTOs = complaintShouquandaibiaoDTOs; |
| | | else |
| | | complaintletterDTO.complaintShouquandaibiaoDTOs = new List<TComplaintShouquandaibiaoDTO>() { new TComplaintShouquandaibiaoDTO() }; |
| | | |
| | | List<TComplaintGongyingshangDTO> complaintGongyingshangDTOs = _cooperOrderService.GetListComplaintGongyingshang(complaintletterDTO.Id); |
| | | if (complaintGongyingshangDTOs.Count > 0) |
| | | complaintletterDTO.complaintGongyingshangDTOs = complaintGongyingshangDTOs; |
| | | else |
| | | complaintletterDTO.complaintGongyingshangDTOs = new List<TComplaintGongyingshangDTO>() { new TComplaintGongyingshangDTO() }; |
| | | |
| | | } |
| | | else |
| | | { |
| | | complaintletterDTO.complaintItemDTOs = new List<TComplaintItemDTO>() { new TComplaintItemDTO() }; |
| | | complaintletterDTO.complaintRespondentDTOs = new List<TComplaintRespondentDTO>() { new TComplaintRespondentDTO() }; |
| | | complaintletterDTO.complaintShouquandaibiaoDTOs = new List<TComplaintShouquandaibiaoDTO>() { new TComplaintShouquandaibiaoDTO() }; |
| | | complaintletterDTO.complaintGongyingshangDTOs = new List<TComplaintGongyingshangDTO>() { new TComplaintGongyingshangDTO() }; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ViewData.Model = complaintletterDTO; |
| | | return View(); |
| | | } |
| | | } |
| | | } |