username@email.com
2022-06-15 0e6d0e8975e92a6395d2d9f692edd5a7d0984c5a
zhengcaioa/zhengcaioa/Controllers/ExpertTest/ExpertTestTopicController.cs
@@ -93,6 +93,10 @@
            ViewBag.zhongdian = _liaotianService.GetSYScode("system", "shifou").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            ViewBag.jiexi_status = _liaotianService.GetSYScode("expert_test_topic", "jiexi_status").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            ViewBag.shenpi_status = _liaotianService.GetSYScode("expert_test_topic", "shenpi_status").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            ViewBag.Falv = _liaotianService.GetSYScode("expert_test_topicjiexi", "falv").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            ViewBag.shanchuzhishitype = _liaotianService.GetSYScodeshanchu("expert_test_topic", "zhishitype").Select(x => new { code = x.CodeSn, label = x.Comments }).ToList();
            var areaDTOs = _areaService.GetList().Where(x => x.ParentId == "0     ").ToList();
            foreach (var areaDTO in areaDTOs)
            {
@@ -139,7 +143,7 @@
                expertTestTopicanwserDTOs = _expertTestTopicService.GetListanwser(id);
                if (dto.Topictype=="03")
                {
                    expertTestTopicanwserDTOs = expertTestTopicanwserDTOs.OrderByDescending(x=>x.Anwserno).ToList();
                    expertTestTopicanwserDTOs = expertTestTopicanwserDTOs.OrderBy(x=>x.Anwserno).ToList();
                }
                if (expertTestTopicanwserDTOs.Count == 0)
                {
@@ -169,7 +173,7 @@
                    expertTestTopicanwserDTO.Anwserno = "√";
                    expertTestTopicanwserDTOs.Add(expertTestTopicanwserDTO);
                    var expertTestTopicanwserDTO1 = new ExpertTestTopicanwserDTO();
                    expertTestTopicanwserDTO1.Anwserno = "×";
                    expertTestTopicanwserDTO1.Anwserno = "x";
                    expertTestTopicanwserDTOs.Add(expertTestTopicanwserDTO1);
                    
@@ -793,6 +797,36 @@
                    expertTestTopicpeizhiDTO.zongFenshu = aaaa.HasValue? aaaa.Value.ToString("0.##"):"";
                    expertTestTopicpeizhiDTO.zongFenzhi = expertTestTopicpeizhiDTO.Fenzhi.HasValue ? expertTestTopicpeizhiDTO.Fenzhi.Value.ToString("0.##") : "";
                }
                foreach (var zhishitype in zhishitypes)
                {
                    var bbbb = expertTestTopicpeizhiDTOs.Where(x => x.Zhishitype == zhishitype.CodeSn).ToList();
                    if (bbbb.Count <= 0)
                    {
                        foreach (var topictype in topictypes)
                        {
                            ExpertTestTopicpeizhiDTO expertTestTopicpeizhiDTO = new ExpertTestTopicpeizhiDTO();
                            expertTestTopicpeizhiDTO.ShijianId = "01";
                            expertTestTopicpeizhiDTO.Topictype = topictype.CodeSn;
                            expertTestTopicpeizhiDTO.TopictypeName = topictype.Comments;
                            expertTestTopicpeizhiDTO.Zhishitype = zhishitype.CodeSn;
                            expertTestTopicpeizhiDTO.ZhishitypeName = zhishitype.Comments;
                            expertTestTopicpeizhiDTO.Fenshu = 0;
                            expertTestTopicpeizhiDTO.Fenzhi = 0;
                            expertTestTopicpeizhiDTO.FenshuName = "0";
                            expertTestTopicpeizhiDTO.FenzhiName = "0";
                            expertTestTopicpeizhiDTO.zongFenshu = "0";
                            expertTestTopicpeizhiDTO.zongFenzhi = "0";
                            expertTestTopicpeizhiDTOs.Add(expertTestTopicpeizhiDTO);
                        }
                        expertTestTopicpeizhiDTOs = expertTestTopicpeizhiDTOs.OrderBy(x => x.Topictype).ThenBy(x => x.Zhishitype).ToList();
                    }
                }
            }
             
@@ -909,6 +943,23 @@
                }
            }
            foreach (var sysCodeDtl in sysCodeDtls)
            {
                var shuliang = expertTestTopicDTOs1.Count(x => x.Topictype == sysCodeDtl.CodeSn);
                var expertTestTopicDTO = new ExpertTestTopicDTO();
                expertTestTopicDTO.Shuliang = shuliang;
                expertTestTopicDTO.ZhishitypeName = "合计";
                expertTestTopicDTO.Zhishitype = "";
                expertTestTopicDTO.Topictype = sysCodeDtl.CodeSn;
                expertTestTopicDTOs.Add(expertTestTopicDTO);
            }
            //ViewBag.topictype = sysCodeDtls;