public JsonResult SaveScene(string userid, string URL, string Detail, string Name, string Desc, string ProjectID, string MedicineCode) { Hashtable htparm = new Hashtable(); htparm["Name"] = Name; htparm["Desc"] = Desc; htparm["Detail"] = Detail; htparm["ProjectID"] = ProjectID; htparm["MedicineCode"] = MedicineCode; int uid = Int32.Parse(userid); int memberid = new MemberUserInfoDao().Find(uid).MemberID; string eName = new EnterpriseMemberInfoDao().Find(memberid).EnterpriseName; htparm["eid"] = new EnterpriseCodeDao().FindByEnterprise(eName).Single().ID; try { if (URL.IndexOf("SceneNo") > 0) { int start = URL.IndexOf("SceneNo") + 7; htparm["SceneNo"] = Int32.Parse(URL.Substring(start, URL.Length - start)); htparm["URL"] = URL + "/" + htparm["SceneNo"]; EmedEvaluationProjectMapper.Get().Update("Scene.myupdate", htparm); } else { htparm["SceneNo"] = EmedEvaluationProjectMapper.Get().QueryForObject<int>("Scene.GetMaxNo", "") + 1; htparm["URL"] = URL + "/" + htparm["SceneNo"]; EmedEvaluationProjectMapper.Get().Insert("Scene.myinsert", htparm); } } catch (Exception e) { return Json("保存失败"); } return Json("保存成功"); }
//数据库自动打分 public JsonResult GetDateBase(string cids, string field, string pid, string eorp, string projectid) { int flag = -1; //找到指标计算方法 List<string> finalscore = new List<string>(); int projid = Int32.Parse(projectid); //此项目是否启用标准化 int IsStandard = new ProjectDao().Find(projid).IsStandard; int p = Int32.Parse(pid); int Method = EmedEvaluationProjectMapper.Get().QueryForObject<int>("Point.GetMethod", p); string nodatacompany = string.Empty; //拼接企业code的sql字符串 string cidlist = "("; string[] tempids = cids.Trim(',').Split(','); foreach (string i in tempids) { cidlist += "'" + i + "',"; } cidlist = cidlist.Substring(0, cidlist.Length - 1); cidlist += ")"; //拼接企业code的sql字符串--完 //非主观分 if (Method != 4) { string[] clist = cids.Substring(0, cids.Length - 1).Split(','); //找到指标分项的KeyValue IList<IDictionary> keyvaluelist = EmedEvaluationProjectMapper.Get().QueryForList<IDictionary>("SmallPoint.GetKeyValue", p); if (keyvaluelist.Count > 0) flag = 1;//表明有指标分项,自动赋值要赋值radiobutton else flag = 0; SqlConnection sqlconn = new SqlConnection("Data Source=180.186.73.141;Initial Catalog=EmedEvaluationBase;Persist Security Info=True;User ID=DataCenter;Password=sqlpassword"); sqlconn.Open(); string strcommand1 = string.Empty; switch (eorp) { case "1": strcommand1 = "select " + field + ",EnterpriseCode from EnterpriseAttributeProject where ProjectID=" + projid + " and EnterpriseCode in" + cidlist + " order by CHARINDEX(','+ RTRIM(EnterpriseCode) + ',' , ',' + '" + cids.Substring(0, cids.Length - 1) + "' + ',')"; break; case "0": strcommand1 = "select " + field + ",ProductCode,Substring(ProductCode,16,12) as EnterpriseCode from ProductAttributeProject where ProjectID=" + projid + " and ProductCode in" + cidlist + " order by CHARINDEX(','+ RTRIM(productcode) + ',' , ',' + '" + cids.Substring(0, cids.Length - 1) + "' + ',')"; break; case "3": strcommand1 = "select " + field + ",EnterpriseCode from EnterpriseAttributeCommon where EnterpriseCode in" + cidlist + " order by CHARINDEX(','+ RTRIM(EnterpriseCode) + ',' , ',' + '" + cids.Substring(0, cids.Length - 1) + "' + ',')"; break; case "2": strcommand1 = "select " + field + ",ProductCode,Substring(ProductCode,16,12) as EnterpriseCode from ProductAttributeCommon where ProductCode in" + cidlist + " order by CHARINDEX(','+ RTRIM(productcode) + ',' , ',' + '" + cids.Substring(0, cids.Length - 1) + "' + ',')"; break; } SqlCommand sqlcomm = new SqlCommand(strcommand1, sqlconn); SqlDataReader reader = sqlcomm.ExecuteReader(); int num = 0; Hashtable htparm = new Hashtable(); htparm["pid"] = projid; while (reader.Read()) { switch (Method) { case 1: //区间求值 bool i = false; foreach (IDictionary k in keyvaluelist) { string[] ks = k["keyValue"].ToString().Split(','); if (float.Parse(reader[0].ToString()) <= float.Parse(ks[1]) && float.Parse(reader[0].ToString()) > float.Parse(ks[0].ToString())) { i = true; finalscore.Add(k["Score"].ToString()); break; } else continue; } if (!i) { htparm["ec"] = reader["EnterpriseCode"].ToString(); nodatacompany += new EnterpriseCodeDao().FindByEnterpiseCode(reader["EnterpriseCode"].ToString()).First().Enterprise + ","; finalscore.Add("0"); } break; case 2: //包含 bool j = false; foreach (IDictionary k in keyvaluelist) { if (k["keyValue"].ToString() == reader[0].ToString()) { j = true; finalscore.Add(k["Score"].ToString()); break; } else continue; } if (!j) { htparm["ec"] = reader["EnterpriseCode"].ToString(); nodatacompany += new EnterpriseCodeDao().FindByEnterpiseCode(reader["EnterpriseCode"].ToString()).First().Enterprise + ","; finalscore.Add("0"); } break; case 3: //公式 int additinal = 0; for (int k = num; k < clist.Length; k++) { if (k > 0 && clist[k] == clist[k - 1]) { finalscore.Add(finalscore[finalscore.Count - 1]); additinal++; continue; } if (reader[1].ToString() == clist[k]) { finalscore.Add(reader[0].ToString()); additinal++; break; } else { if (eorp == "1") { htparm["ec"] = clist[k]; nodatacompany += new EnterpriseCodeDao().FindByEnterpiseCode(clist[k]).First().Enterprise + ","; } else { htparm["ec"] = clist[k].Substring(15, 12); nodatacompany += new EnterpriseCodeDao().FindByEnterpiseCode(clist[k].Substring(15, 12)).First().Enterprise + ","; } finalscore.Add("暂无数据"); additinal++; continue; } } num = num + additinal; break; default: break; } } reader.Close(); sqlconn.Close(); } else { //主观分计算 flag = 3; SubjectPoint sp = new SubjectPointDao().FindByPointID(p).Single(); string[] ids = cids.Trim(',').Split(','); Hashtable hhtparm = new Hashtable(); foreach (string code in ids) { string ecode = code.Substring(15, 12); hhtparm["pid"] = Int32.Parse(projectid); hhtparm["ecode"] = ecode; IList<double> fds = EmedEvaluationProjectMapper.Get().QueryForList<double>("Expert.FindFD", hhtparm);//找到相应的专家行为分析数据 double score = 0; if (fds.Count != 0) score = sp.Average.Value + sp.MaxValue.Value * fds.First(); else { Hashtable htparm = new Hashtable(); htparm["pid"] = projid; htparm["ec"] = ecode; nodatacompany += new EnterpriseCodeDao().FindByEnterpiseCode(ecode).First().Enterprise + ","; } finalscore.Add(score.ToString()); } } string result = string.Empty; foreach (string s in finalscore) { result += s + ","; } return Json(new { result = result.Trim(','), flag = flag, nodatacompany = nodatacompany }); }
public JsonResult ListAuthorizationCompany(string projectoid) { int oid = Int32.Parse(projectoid); IList<IDictionary> list = EmedEvaluationProjectMapper.Get().QueryForList<IDictionary>("AuthorizationProject.FindByPoid", oid); string html = "<tr><th>参评公司</th><th height='26' >项目名称</th></tr>"; foreach (IDictionary a in list) { string companyname = new EnterpriseCodeDao().Find(Int32.Parse(a["EnterpriseID"].ToString())).Enterprise; html += "<tr>"; html += "<td><input type='hidden' value='" + a["EnterpriseID"] + "'/><a class='eachauthorization' href='javascript:void(0)'>" + companyname + "</a></td>"; html += "<td>" + a["ProjectName"] + "</td></tr>"; } return Json(html); }
public ActionResult Detail(Int32? id, int eid,string parm, FormCollection collection) { Dictionary<string, string> sitemaster = GetSiteMaster(); ViewData["SiteMaster"] = sitemaster; int PageNo = id ?? 1; if (Int32.Parse(sitemaster["isadmin"]) > 2) { string selectview = string.Empty; Hashtable htparm = new Hashtable(); htparm["start"] = PageSizeList * (PageNo - 1) + 1; //记录开始数 htparm["end"] = PageNo * PageSizeList; //记录结束数 htparm["enterprisecode"] = new EnterpriseCodeDao().Find(eid).EnterpiseCode; ViewData["eid"] = htparm["enterprisecode"]; Dictionary<string, string> dict = ParmHelper.Analysis(collection); //如果是刚打开页面 if (dict.Count == 0 && parm == null) { IList<IDictionary> bidAnounceList; bidAnounceList = CRMMapper.Get().QueryForList<IDictionary>("MemberProduct.GetOwnProduct", htparm); int count = CRMMapper.Get().QueryForObject<int>("MemberProduct.GetOwnProductCount", htparm); PagedList<IDictionary> list = new PagedList<IDictionary>(bidAnounceList, PageNo, PageSizeList, count); ViewData["ProvincebidAnounceListByUser"] = list; ViewData["Count"] = count; return View(list); } //如果有查询参数了 if (dict.Count == 0 && parm != null) { Dictionary<string, string> use = ParmHelper.AnalysisParm(parm); foreach (KeyValuePair<string, string> doc in use) { switch (doc.Key) { case "Category": if (doc.Value != "无") { htparm[doc.Key] = doc.Value; } break; default: htparm[doc.Key] = doc.Value; break; } } IList<IDictionary> bidAnounceList = CRMMapper.Get().QueryForList<IDictionary>("MemberProduct.GetOwnProduct", htparm); int count = CRMMapper.Get().QueryForObject<int>("MemberProduct.GetOwnProductCount", htparm); PagedList<IDictionary> list = new PagedList<IDictionary>(bidAnounceList, PageNo, PageSizeList, count); ViewData["ProvincebidAnounceListByUser"] = list; ViewData["Form"] = use; selectview = string.Empty; ViewData["Count"] = count; return View(list); } else { //把表单转为参数 if (dict.Count != 0) { string parmeter = ParmHelper.BuildParm(dict); return RedirectToAction("Detail", new { id = 1, eid=eid,parm = parmeter }); } } return View(); } else return RedirectToAction("MemberLevelError", "Base"); }
public ActionResult Middle(int? id, int? PageNo) { Dictionary<string, string> sitemaster = GetSiteMaster(); ViewData["SiteMaster"] = sitemaster; int page = PageNo ?? 1; int userid = Int32.Parse(CurrentUserInfo.UserID); int eid = new EnterpriseCodeDao().FindByEnterprise(EnterPriseMemberInfo.EnterpriseName).Single().ID; Hashtable ht = new Hashtable(); ht["eid"] = eid; ht["pid"] = id.Value; EnterpriseCode ec = new EnterpriseCodeDao().FindByEnterprise(EnterPriseMemberInfo.EnterpriseName).First(); int memberid = ec.ID; IList<string> medicinebaseidlist = EmedAppraiseMapper.Get().QueryForList<string>("AuthorizationAuctionProject.queryid", memberid); /*IList<string> productbaselist = new List<string>(); foreach (string m in medicinebaseidlist) { productbaselist.Add(EmedEvaluationBaseMapper.Get().QueryForObject<string>("ChineseAndImportMed.GetMedicineCode",m)); }*/ Hashtable htparm = new Hashtable(); //如果授权了(比如经营企业) if (medicinebaseidlist.Count != 0) { IList<string> medicineprojectidlist = EmedAppraiseMapper.Get().QueryForList<string>("AuctionProjectProduct.queryid", id); string[] idlist = medicinebaseidlist.Intersect<string>(medicineprojectidlist).ToArray(); htparm["pids"] = idlist; } else { //如果生产企业,可以不需要授权 htparm["pid"] = id.Value; htparm["eccode"] = ec.EnterpiseCode; string[] idlist = EmedAppraiseMapper.Get().QueryForList<string>("AuctionProjectProduct.listproduct", htparm).ToArray(); htparm["pids"] = idlist; } htparm["start"] = PageSizeList * (page - 1) + 1; //记录开始数 htparm["end"] = page * PageSizeList; //记录结束数 IList<IDictionary> medicinelist = EmedEvaluationBaseMapper.Get().QueryForList<IDictionary>("ChineseAndImportMed.ListMedicine", htparm); PagedList<IDictionary> list = new PagedList<IDictionary>( medicinelist, page, PageSizeList, medicinelist.Count); ViewData["Count"] = medicinelist.Count; ViewData["Projectid"] = id.Value; return View(list); }
// public ActionResult Step1(int? Projectid, string itemid, int? scene, FormCollection collection) { Dictionary<string, string> sitemaster = GetSiteMaster(); ViewData["uid"] = sitemaster["userid"]; //ViewData["SiteMaster"] = sitemaster; //ViewData["TenderEnterprise"] = EnterPriseMemberInfo.EnterpriseName; //EnterpriseCode ec = new EnterpriseCodeDao().FindByEnterprise(EnterPriseMemberInfo.EnterpriseName).First(); //int eid = ec.ID; //string ecode = ec.EnterpiseCode; //ViewData["eid"] = eid; bool needregion = false; //此项目是否启用标准化 int IsStandard = new ProjectDao().Find(Projectid.Value).IsStandard; Hashtable ht = new Hashtable(); ht["pid"] = Projectid.Value; ht["itemid"] = itemid; IDictionary medicineinfo = (IsStandard == 1) ? StandardDataMapper.Get().QueryForObject<IDictionary>("CompareData.ListSingleName", itemid) : EmedEvaluationProjectMapper.Get().QueryForObject<IDictionary>("CompareDataProject.ListSingleName", ht); ViewData["medicineinfo"] = medicineinfo; ViewData["Projectid"] = Projectid.Value; int IsBest = new ProjectDao().Find(Projectid.Value).IsBest; ViewData["IsBest"] = IsBest;//是否技术标的标志 ViewData["ProductID"] = itemid; ViewData["Detail"] = ""; //是否是通过原来保存的场景过来的 if (scene != null) { ViewData["Detail"] = EmedEvaluationProjectMapper.Get().QueryForObject<string>("Scene.FindByScenceNo", scene.Value); } //是否是通过原来保存的场景过来的--完 //如果有通用名分组情况,构建通用名分组列表 StringBuilder commonnamegrouphtml = new StringBuilder(); Hashtable cghtparm = new Hashtable(); cghtparm["pid"] = Projectid.Value; cghtparm["namecode"] = medicineinfo["MedicineCode"].ToString().Substring(0, 7); string namecodes = EmedEvaluationProjectMapper.Get().QueryForObject<string>("CommonNameGroup.GetNameCodes", cghtparm); if (namecodes != null && namecodes != "") { commonnamegrouphtml.Append("<tr><td >" + medicineinfo["ChineseProductName"] + "</td><td>" + medicineinfo["Formulation"] + "</td><td>" + medicineinfo["ChineseSpecification"] + "</td><tr>"); string[] namecodelist = namecodes.Split(','); string[] medicinecodelist = new string[namecodelist.Length]; int i = 0; foreach (string n in namecodelist) { medicinecodelist[i] = namecodelist[i] + medicineinfo["MedicineCode"].ToString().Substring(7, 8); i++; } Hashtable namegrouphtparm = new Hashtable(); namegrouphtparm["ownmc"] = medicineinfo["MedicineCode"]; namegrouphtparm["mclist"] = medicinecodelist; namegrouphtparm["pid"] = Projectid.Value; IList<IDictionary> commonnamegroup = (IsStandard == 1) ? StandardDataMapper.Get().QueryForList<IDictionary>("CompareMedicine.ListMedicineEx", namegrouphtparm) : EmedEvaluationProjectMapper.Get().QueryForList<IDictionary>("MedicineDataProject.ListMedicineEx", namegrouphtparm); foreach (IDictionary c in commonnamegroup) { commonnamegrouphtml.Append("<tr><td >" + c["ChineseProductName"] + "</td><td>" + c["Formulation"] + "</td><td>" + c["ChineseSpecification"] + "</td><tr>"); } } ViewData["CommonNameGroup"] = commonnamegrouphtml.ToString(); //如果有通用名分组情况,构建通用名分组列表--完 //如果有剂型分组情况,构建剂型分组列表 StringBuilder formulationgrouphtml = new StringBuilder(); Hashtable fghtparm = new Hashtable(); fghtparm["pid"] = Projectid.Value; fghtparm["namecode"] = medicineinfo["MedicineCode"].ToString().Substring(0, 10); string fomulationcodes = EmedEvaluationProjectMapper.Get().QueryForObject<string>("FormulationGroup.GetNameCodes", fghtparm); if (fomulationcodes != null && fomulationcodes != "") { commonnamegrouphtml.Append("<tr><td >" + medicineinfo["ChineseProductName"] + "</td><td>" + medicineinfo["Formulation"] + "</td><td>" + medicineinfo["ChineseSpecification"] + "</td><tr>"); string[] formulationcodelist = fomulationcodes.Split(','); string[] medicinecodelist = new string[formulationcodelist.Length]; int i = 0; foreach (string n in formulationcodelist) { medicinecodelist[i] = formulationcodelist[i] + medicineinfo["MedicineCode"].ToString().Substring(10, 5); i++; } Hashtable namegrouphtparm = new Hashtable(); namegrouphtparm["ownmc"] = medicineinfo["MedicineCode"]; namegrouphtparm["mclist"] = medicinecodelist; namegrouphtparm["pid"] = Projectid.Value; IList<IDictionary> formulationnamegroup = (IsStandard == 1) ? StandardDataMapper.Get().QueryForList<IDictionary>("CompareMedicine.ListMedicineEx", namegrouphtparm) : EmedEvaluationProjectMapper.Get().QueryForList<IDictionary>("MedicineDataProject.ListMedicineEx", namegrouphtparm); foreach (IDictionary c in formulationnamegroup) { formulationgrouphtml.Append("<tr><td >" + c["ChineseProductName"] + "</td><td>" + c["Formulation"] + "</td><td>" + c["ChineseSpecification"] + "</td><tr>"); } } ViewData["FormulationGroup"] = formulationgrouphtml.ToString(); //如果有剂型分组情况,构建剂型分组列表--完 //构建指标分类的tabel IList<PointCategory> pointcategorylist = new PointCategoryDao().FindByProjectOid(Projectid.Value); StringBuilder CategoryHtml = new StringBuilder(); StringBuilder PointHtml = new StringBuilder(); int totalpointNum = 0; foreach (PointCategory p in pointcategorylist) { if (p.Name == "价格分") needregion = true; int pointnum = EmedEvaluationProjectMapper.Get().QueryForObject<int>("Point.count", p.ID); IList<Point> plist = new PointDao().FindByCategoryID(p.ID); int count = 0; foreach (Point pp in plist) { count++; if (pp.Iseorp == 1) PointHtml.Append("<td nowrap='nowrap'><Label style='cursor:pointer;text-decoration:underline;' class='pointdetail'>指标" + count + "</Lable><input type='hidden' class='pointname' value='" + pp.Name + "' /><br /><input pointid='" + pp.ID + "' class='usedatabase' type='button' value='自动打分' Field='" + pp.Field + "' Eorp='" + pp.EORP + "'></td>"); else PointHtml.Append("<td nowrap='nowrap'><Label style='cursor:pointer;text-decoration:underline;' class='pointdetail'>指标" + count + "</Lable><input type='hidden' class='pointname' value='" + pp.Name + "' /></td>"); } CategoryHtml.Append("<td class='bidpoint' nowrap='nowrap' colspan='" + pointnum + "'>" + p.Name + "</td>"); totalpointNum += pointnum; } foreach (PointCategory p in pointcategorylist) { PointHtml.Append("<td nowrap='nowrap'>" + p.Name + "(总计)" + "</td>"); } ViewData["CategoryHtml"] = CategoryHtml.ToString(); ViewData["CategoryCount"] = totalpointNum; if (IsBest == 1) ViewData["ScoreCount"] = pointcategorylist.Count + 3; else ViewData["ScoreCount"] = pointcategorylist.Count + 2; ViewData["PointHtml"] = PointHtml.ToString(); //构建指标分类的tabel--完 StringBuilder content = new StringBuilder(); Hashtable elhtparm = new Hashtable(); //elhtparm["pc"]=itemid.Substring(0,15); elhtparm["pid"] = Projectid.Value; elhtparm["ownitem"] = itemid; elhtparm["ownid"] = itemid.Substring(15, 12); //IList<int> enterpriselist = EmedEvaluationProjectMapper.Get().QueryForList<int>("AuthorizationProject.queryenterpriseid", elhtparm); List<string> mclist = new List<string>(); mclist.Add(itemid.Substring(0, 15)); //如果包含通用名分组,要并入列表一起进行评标 if (namecodes != null && namecodes != "") { string[] namecodelist = namecodes.Split(','); //string[] medicinecodelist = new string[namecodelist.Length]; int i = 0; foreach (string n in namecodelist) { mclist.Add(namecodelist[i] + medicineinfo["MedicineCode"].ToString().Substring(7, 8)); i++; } //elhtparm["mcodes"] = medicinecodelist; } //如果包含通用名分组,要并入列表一起进行评标--完 //如果包含剂型分组,要并入列表一起进行评标 if (fomulationcodes != null && fomulationcodes != "") { string[] formulationcodelist = fomulationcodes.Split(','); string[] medicinecodelist = new string[formulationcodelist.Length]; int i = 0; foreach (string n in formulationcodelist) { mclist.Add(formulationcodelist[i] + medicineinfo["MedicineCode"].ToString().Substring(7, 8)); i++; } //elhtparm["mcodes"] = medicinecodelist; } elhtparm["mcodes"] = mclist.ToArray(); //如果包含剂型分组,要并入列表一起进行评标--完 //加入匹配条件质量层次 elhtparm["levelid"] = EmedEvaluationProjectMapper.Get().QueryForObject<object>("ProjectProduct.queryforlevel", elhtparm); //根据是否采用标准化数据,用不同的sql语句查找企业列表 IList<IDictionary> enterpriselist = new List<IDictionary>(); if (IsStandard == 1) enterpriselist = EmedEvaluationProjectMapper.Get().QueryForList<IDictionary>("ProjectProduct.queryenterpriseid", elhtparm); else { if (needregion) enterpriselist = EmedEvaluationProjectMapper.Get().QueryForList<IDictionary>("ProjectProduct.queryenterpriseidex", elhtparm); else enterpriselist = EmedEvaluationProjectMapper.Get().QueryForList<IDictionary>("ProjectProduct.queryenterpriseidexnoprice", elhtparm); } //根据是否采用标准化数据,用不同的sql语句查找企业列表--完 //开始构建核心table的自己产品那一行,其中第一列为企业信息,且为隐藏状态 StringBuilder EnterpriseList = new StringBuilder(); content.Append("<tr id='OwnProduct' class='sort'>"); Hashtable ecphtparm = new Hashtable(); ecphtparm["pid"] = Projectid.Value; ecphtparm["ec"] = itemid.Substring(15, 12); //string ownenterprise = (IsStandard == 1) ? new EnterpriseCodeDao().FindByEnterpiseCode(itemid.Substring(15, 12)).First().Enterprise : EmedEvaluationProjectMapper.Get().QueryForObject<string>("EnterpriseCodeProject.Findename",ecphtparm); string ownenterprise = new EnterpriseCodeDao().FindByEnterpiseCode(itemid.Substring(15, 12)).First().Enterprise; EnterpriseList.Append("<tr><td>" + ownenterprise + "</td></tr>"); if (IsStandard == 1) content.Append("<td nowrap='nowrap' id='Own' style='display:none;'>" + ownenterprise + "<input type='hidden' class='pc' value='" + itemid + "' /><input type='hidden' export='excel' value='" + ownenterprise + "' /></td>"); else { if (needregion) content.Append("<td nowrap='nowrap' id='Own' style='display:none;'>" + ownenterprise + "<input type='hidden' class='pc' value='" + medicineinfo["StandardProductCode"] + "' /><input type='hidden' export='excel' value='" + ownenterprise + "' /></td>"); else content.Append("<td nowrap='nowrap' id='Own' style='display:none;'>" + ownenterprise + "<input type='hidden' class='pc' value='" + medicineinfo["ProductCode"] + "' /><input type='hidden' export='excel' value='" + ownenterprise + "' /></td>"); } //开始构建指标分项以及分值输入框 foreach (PointCategory p in pointcategorylist) { IList<Point> plist = new PointDao().FindByCategoryID(p.ID); foreach (Point pp in plist) { IList<SmallPoint> splist = new SmallPointDao().FindByPointID(pp.ID); content.Append("<td nowrap='nowrap' eid='" + itemid.Substring(15, 12) + "' class='" + pp.ID + "'>"); string defaultvalue = string.Empty; if (pp.Method != 3) { char sptitle = 'A'; foreach (SmallPoint sp in splist) { if (sp.IsDefault.HasValue && sp.IsDefault.Value == 1) { content.Append("<input BigCategory='" + p.ID + "' Score='" + sp.Score + "' type='radio' checked='checked' class='smallpoint' name='" + itemid.Substring(15, 12) + sp.PointID + "' value='" + sp.Score + "' /><Span><Label style='cursor:pointer;text-decoration:underline;' class='smallpointdetail'>" + sptitle + ".</Label><input type='hidden' class='pointname' value='" + sp.Name + "' /></Span><br />"); defaultvalue = sp.Score.Value.ToString(); } else content.Append("<input BigCategory='" + p.ID + "' Score='" + sp.Score + "' type='radio' checked='unchecked' class='smallpoint' name='" + itemid.Substring(15, 12) + sp.PointID + "' value='" + sp.Score + "' /><Span><Label style='cursor:pointer;text-decoration:underline;' class='smallpointdetail'>" + sptitle + ".</Label><input type='hidden' class='pointname' value='" + sp.Name + "' /></Span><br />"); /*if (sp.Name.Length <= 8) { if (sp.IsDefault.HasValue && sp.IsDefault.Value == 1) { content += "<input BigCategory='" + p.ID + "' Score='" + sp.Score + "' type='radio' checked='checked' class='smallpoint' name='" + itemid.Substring(15, 12) + sp.PointID + "' value='" + sp.Score + "' />" + sp.Name + "<br />"; defaultvalue = sp.Score.Value.ToString(); } else content += "<input BigCategory='" + p.ID + "' Score='" + sp.Score + "' type='radio' checked='unchecked' class='smallpoint' name='" + itemid.Substring(15, 12) + sp.PointID + "' value='" + sp.Score + "' />" + sp.Name + "<br />"; } else { if (sp.IsDefault.HasValue && sp.IsDefault.Value == 1) { content += "<input BigCategory='" + p.ID + "' Score='" + sp.Score + "' type='radio' checked='checked' class='smallpoint' name='" + itemid.Substring(15, 12) + sp.PointID + "' value='" + sp.Score + "' />" + sp.Name.Substring(0, 8) + "..." + "<Span><Label style='font-style:italic;cursor:pointer;text-decoration:underline;' class='smallpointdetail'>详细</Label><input type='hidden' class='pointname' value='" + sp.Name + "' /></Span><br />"; defaultvalue = sp.Score.Value.ToString(); } else content += "<input BigCategory='" + p.ID + "' Score='" + sp.Score + "' type='radio' checked='unchecked' class='smallpoint' name='" + itemid.Substring(15, 12) + sp.PointID + "' value='" + sp.Score + "' />" + sp.Name.Substring(0, 8) + "..." + "<Span><Label style='font-style:italic;cursor:pointer;text-decoration:underline;' class='smallpointdetail'>详细</Label><input type='hidden' class='pointname' value='" + sp.Name + "' /></Span><br />"; }*/ sptitle = (char)(((int)sptitle) + 1); } if (pp.FormatID == null) content.Append("<div style='margin-top:20px;'><label style='color:'red;'>得分:</label><input Format='0' CategoryScore='" + p.ID + "' type='text' export='excel' class='score' size='6' value='" + defaultvalue + "'/><div></td>"); else { IDictionary format = EmedEvaluationProjectMapper.Get().QueryForObject<IDictionary>("Format.GetFormat", pp.FormatID); content.Append("<div style='margin-top:20px;'><input type='button' class='queryprice' value='测算报价'/><br /><label style='color:'red;'>输入价格:</label><input Format='1' CategoryScore='" + p.ID + "' type='text' export='excel' class='score' size='6'/><input keyword='" + format["keyword"] + "' type='hidden' class='format' value='" + format["code"] + "' /></div></td>"); } } else { IDictionary format = EmedEvaluationProjectMapper.Get().QueryForObject<IDictionary>("Format.GetFormat", pp.FormatID); content.Append("<div style='margin-top:20px;'>" + pp.ExtraHtml + "<label style='color:'red;'>输入数值:</label><input Format='0' Method='" + pp.Method + "' type='text' paramnum='" + pp.ParamNum + "' class='inputscore' size='6'/><input keyword='" + format["keyword"] + "' type='hidden' class='format' value='" + format["code"] + "' /></div><div style='margin-top:20px;'><label style='color:'red;'>得分:</label><input Format='0' CategoryScore='" + p.ID + "' type='text' Method='" + pp.Method + "' export='excel' class='score' size='6' value='" + defaultvalue + "'/><div></td>"); } } } //开始构建指标分项以及分值输入框--完 //每种指标分类的总分列 foreach (PointCategory p in pointcategorylist) { content.Append("<td export='excel' nowrap='nowrap' percent='" + p.Percentage + "' class='eachcategory' Category='" + p.ID + "'></td>"); } //每种指标分类的总分列--完 //是否技术标,table列有所区别 if (IsBest == 1) content.Append("<td export='excel' nowrap='nowrap' class='Quote'></td><td export='excel' class='best' nowrap='nowrap'></td><td export='excel' nowrap='nowrap' class='result'></td></tr>"); else content.Append("<td export='excel' nowrap='nowrap' class='Quote'></td><td export='excel' nowrap='nowrap' class='result'></td></tr>"); //开始构建其他竞品 foreach (IDictionary enterprise in enterpriselist) { string enterid = enterprise["EnterpiseCode"].ToString(); EnterpriseList.Append("<tr><td>" + enterprise["enterprise"] + "</td></tr>"); content.Append("<tr class='sort'>"); content.Append("<td nowrap='nowrap' style='display:none'>" + enterprise["enterprise"] + "<input type='hidden' class='pc' value='" + enterprise["ProductCode"].ToString() + "' /><input type='hidden' export='excel' value='" + enterprise["enterprise"] + "' /></td>"); foreach (PointCategory p in pointcategorylist) { IList<Point> plist = new PointDao().FindByCategoryID(p.ID); foreach (Point pp in plist) { IList<SmallPoint> splist = new SmallPointDao().FindByPointID(pp.ID); content.Append("<td nowrap='nowrap' eid='" + enterid + "' class='" + pp.ID + "'>"); string defaultvalue = string.Empty; if (pp.Method != 3) { char sptitle = 'A'; foreach (SmallPoint sp in splist) { /*if (sp.Name.Length <= 8) { if (sp.IsDefault.HasValue && sp.IsDefault.Value == 1) { content += "<input BigCategory='" + p.ID + "' Score='" + sp.Score + "' type='radio' checked='checked' class='smallpoint' name='" + enterid + sp.PointID + "' value='" + sp.Score + "' />" + sp.Name + "<br />"; defaultvalue = sp.Score.Value.ToString(); } else content += "<input BigCategory='" + p.ID + "' Score='" + sp.Score + "' type='radio' checked='unchecked' class='smallpoint' name='" + enterid + sp.PointID + "' value='" + sp.Score + "' />" + sp.Name + "<br />"; } else { if (sp.IsDefault.HasValue && sp.IsDefault.Value == 1) { content += "<input BigCategory='" + p.ID + "' Score='" + sp.Score + "' type='radio' checked='checked' class='smallpoint' name='" + enterid + sp.PointID + "' value='" + sp.Score + "' />" + sp.Name.Substring(0, 8) + "..." + "<Span><Label style='font-style:italic;cursor:pointer;text-decoration:underline;' class='smallpointdetail'>详细</Label><input type='hidden' class='pointname' value='" + sp.Name + "' /></Span><br />"; defaultvalue = sp.Score.Value.ToString(); } else { content += "<input BigCategory='" + p.ID + "' Score='" + sp.Score + "' type='radio' checked='unchecked' class='smallpoint' name='" + enterid + sp.PointID + "' value='" + sp.Score + "' />" + sp.Name.Substring(0, 8) + "..." + "<Span><Label style='font-style:italic;cursor:pointer;text-decoration:underline;' class='smallpointdetail'>详细</Label><input type='hidden' class='pointname' value='" + sp.Name + "' /></Span><br />"; } }*/ if (sp.IsDefault.HasValue && sp.IsDefault.Value == 1) { content.Append("<input BigCategory='" + p.ID + "' Score='" + sp.Score + "' type='radio' checked='checked' class='smallpoint' name='" + enterid + sp.PointID + "' value='" + sp.Score + "' /><Span><Label style='cursor:pointer;text-decoration:underline;' class='smallpointdetail'>" + sptitle + ".</Label><input type='hidden' class='pointname' value='" + sp.Name + "' /></Span><br />"); defaultvalue = sp.Score.Value.ToString(); } else content.Append("<input BigCategory='" + p.ID + "' Score='" + sp.Score + "' type='radio' checked='unchecked' class='smallpoint' name='" + enterid + sp.PointID + "' value='" + sp.Score + "' /><Span><Label style='cursor:pointer;text-decoration:underline;' class='smallpointdetail'>" + sptitle + ".</Label><input type='hidden' class='pointname' value='" + sp.Name + "' /></Span><br />"); sptitle = (char)(((int)sptitle) + 1); } if (pp.FormatID == null) content.Append("<div style='margin-top:20px;'><label style='color:'red;'>得分:</label><input Format='0' CategoryScore='" + p.ID + "' type='text' export='excel' class='score' size='6' value='" + defaultvalue + "' /><div></td>"); else { IDictionary format = EmedEvaluationProjectMapper.Get().QueryForObject<IDictionary>("Format.GetFormat", pp.FormatID); content.Append("<div style='margin-top:20px;'><input type='button' class='queryprice' value='测算报价'/><br /><label style='color:'red;'>输入价格:</label><input Format='1' CategoryScore='" + p.ID + "' type='text' export='excel' class='score' size='6' /><input type='hidden' class='format' value='" + format["code"] + "' /><div></td>"); } } else { IDictionary format = EmedEvaluationProjectMapper.Get().QueryForObject<IDictionary>("Format.GetFormat", pp.FormatID); content.Append("<div style='margin-top:20px;'>" + pp.ExtraHtml + "<label style='color:'red;'>输入数值:</label><input Format='0' Method='" + pp.Method + "' type='text' paramnum='" + pp.ParamNum + "' class='inputscore' size='6'/><input keyword='" + format["keyword"] + "' type='hidden' class='format' value='" + format["code"] + "' /></div><div style='margin-top:20px;'><label style='color:'red;'>得分:</label><input Format='0' CategoryScore='" + p.ID + "' type='text' Method='" + pp.Method + "' export='excel' class='score' size='6' value='" + defaultvalue + "'/><div></td>"); } } } foreach (PointCategory p in pointcategorylist) { content.Append("<td export='excel' nowrap='nowrap' percent='" + p.Percentage + "' class='eachcategory' Category='" + p.ID + "'></td>"); } if (IsBest == 1) content.Append("<td export='excel' nowrap='nowrap' class='Quote'></td><td export='excel' class='best' nowrap='nowrap'></td><td export='excel' nowrap='nowrap' class='result'></td></tr>"); else content.Append("<td export='excel' nowrap='nowrap' class='Quote'></td><td export='excel' nowrap='nowrap' class='result'></td></tr>"); } //开始构建其他竞品--完 //如果有评测报价,初始化省份地区 if (needregion) { ViewData["Regionhtml"] = GetCityRegion(); } ViewData["content"] = content.ToString(); ViewData["EnterpriseList"] = EnterpriseList.ToString(); ViewData["formurl"] = "/SimulationE/Export.mvc/" + Projectid.Value + "/" + itemid; return View(); }
/*public ActionResult Detail(int? id,int?PageNo,string parm,FormCollection collection) { Dictionary<string, string> sitemaster = GetSiteMaster(); ViewData["SiteMaster"] = sitemaster; //此项目是否启用标准化 int IsStandard = new ProjectDao().Find(id.Value).IsStandard; PageSizeList = 50; int page = PageNo ?? 1; int userid = Int32.Parse(CurrentUserInfo.UserID); Hashtable ecechtparm = new Hashtable(); ecechtparm["pid"] = id.Value; ecechtparm["name"] = EnterPriseMemberInfo.EnterpriseName; EnterpriseCode ec = (IsStandard == 1) ? new EnterpriseCodeDao().FindByEnterprise(EnterPriseMemberInfo.EnterpriseName).First() : EmedEvaluationProjectMapper.Get().QueryForObject<EnterpriseCode>("EnterpriseCodeProject.Findecode", ecechtparm); int eid = ec.ID; Hashtable ht = new Hashtable(); ht["eid"] = eid; ht["pid"] = id.Value; int scenecount = EmedEvaluationProjectMapper.Get().QueryForObject<int>("Scene.AllCount", ht); StringBuilder html = new StringBuilder(); //string html = string.Empty; if (scenecount > 0) { IList<IDictionary> scenelist = EmedEvaluationProjectMapper.Get().QueryForList<IDictionary>("Scene.AllScene", ht); if (IsStandard == 1) { foreach (IDictionary s in scenelist) { html.Append("<tr><td><a onclick='return false;' href='" + s["URL"] + "' class='scenelink' />" + s["SceneName"] + "</a></td>"); html.Append( "<td>" + new ProjectDao().Find(Int32.Parse(s["ProjectID"].ToString())).Name + "</td>"); html.Append("<td>" + StandardDataMapper.Get().QueryForObject<string>("CompareData.FindName", s["MedicineCode"].ToString()) + "</td>"); html.Append( "<td>" + (s["CreateTime"] != null ? s["CreateTime"].ToString() : "") + "</td>"); html.Append( "<td>" + (s["Description"] != null ? s["Description"].ToString() : "") + "</td></tr>"); } } else { Hashtable hparm = new Hashtable(); hparm["pid"] = id.Value; foreach (IDictionary s in scenelist) { html.Append( "<tr><td><a onclick='return false;' href='" + s["URL"] + "' class='scenelink' />" + s["SceneName"] + "</a></td>"); html.Append( "<td>" + new ProjectDao().Find(Int32.Parse(s["ProjectID"].ToString())).Name + "</td>"); hparm["mcode"] = s["MedicineCode"].ToString(); html.Append( "<td>" + EmedEvaluationProjectMapper.Get().QueryForObject<string>("CompareDataProject.FindName", hparm) + "</td>"); html.Append( "<td>" + (s["CreateTime"] != null ? s["CreateTime"].ToString() : "") + "</td>"); html.Append( "<td>" + (s["Description"] != null ? s["Description"].ToString() : "") + "</td></tr>"); } } } ViewData["html"] = html.ToString(); int memberid = ec.ID; Hashtable aphtparm=new Hashtable(); aphtparm["pid"] = id; aphtparm["eid"] = ec.ID; IList<string> medicinebaseidlist = EmedEvaluationProjectMapper.Get().QueryForList<string>("AuthorizationProject.queryid", aphtparm); /*IList<string> productbaselist = new List<string>(); foreach (string m in medicinebaseidlist) { productbaselist.Add(EmedEvaluationBaseMapper.Get().QueryForObject<string>("ChineseAndImportMed.GetMedicineCode",m)); } Hashtable htparm = new Hashtable(); htparm["pids"] = medicinebaseidlist; int count = medicinebaseidlist.Count; if (count == 0) { //如果生产企业,可以不需要授权 htparm["pid"]=id.Value; htparm["eccode"]=ec.EnterpiseCode; string[] idlist=EmedEvaluationProjectMapper.Get().QueryForList<string>("ProjectProduct.listproduct",htparm).ToArray(); htparm["pids"]=idlist; count = idlist.Length; } htparm["start"] = PageSizeList * (page - 1) + 1; //记录开始数 htparm["end"] = page * PageSizeList; //记录结束数 Dictionary<string, string> dict = ParmHelper.Analysis(collection); if (dict.Count == 0 && parm == null) { if (IsStandard == 1) { IList<IDictionary> medicinelist = StandardDataMapper.Get().QueryForList<IDictionary>("CompareData.ListMedicine", htparm); //int count = StandardDataMapper.Get().QueryForObject<int>("CompareData.ListMedicineCount", htparm); PagedList<IDictionary> list = new PagedList<IDictionary>( medicinelist, page, PageSizeList, count); ViewData["Count"] = count; ViewData["Projectid"] = id.Value; return View(list); } else { htparm["pid"] = id.Value; IList<IDictionary> medicinelist = EmedEvaluationProjectMapper.Get().QueryForList<IDictionary>("CompareDataProject.ListMedicine", htparm); //int count = EmedEvaluationProjectMapper.Get().QueryForObject<int>("CompareDataProject.ListMedicineCount", htparm); PagedList<IDictionary> list = new PagedList<IDictionary>( medicinelist, page, PageSizeList, count); ViewData["Count"] = count; ViewData["Projectid"] = id.Value; return View(list); } } if (dict.Count == 0 && parm != null) { Dictionary<string, string> use = ParmHelper.AnalysisParm(parm); ViewData["Form"] = use; foreach (KeyValuePair<string, string> k in use) { htparm.Add(k.Key, k.Value); } if (IsStandard == 1) { IList<IDictionary> medicinelist = StandardDataMapper.Get().QueryForList<IDictionary>("CompareData.ListMedicine", htparm); int parmcount = StandardDataMapper.Get().QueryForObject<int>("CompareData.ListMedicineCount", htparm); PagedList<IDictionary> list = new PagedList<IDictionary>( medicinelist, page, PageSizeList, parmcount); ViewData["Count"] = parmcount; ViewData["Projectid"] = id.Value; return View(list); } else { htparm["pid"] = id.Value; IList<IDictionary> medicinelist = EmedEvaluationProjectMapper.Get().QueryForList<IDictionary>("CompareDataProject.ListMedicine", htparm); int parmcount = EmedEvaluationProjectMapper.Get().QueryForObject<int>("CompareDataProject.ListMedicineCount", htparm); PagedList<IDictionary> list = new PagedList<IDictionary>( medicinelist, page, PageSizeList, parmcount); ViewData["Count"] = count; ViewData["Projectid"] = id.Value; return View(list); } } else { if (dict.Count != 0) { string parmeter = ParmHelper.BuildParm(dict); return RedirectToAction("Detail", new { id = id.Value,PageNo=1, parm = parmeter }); } } return View(); }*/ public ActionResult Detail(int? id, int? PageNo, string parm, FormCollection collection) { Dictionary<string, string> sitemaster = GetSiteMaster(); ViewData["SiteMaster"] = sitemaster; //此项目是否启用标准化 Project pro = new ProjectDao().Find(id.Value); int IsStandard = pro.IsStandard; ViewData["IsBusseniss"] = pro.IsBussiness * pro.IsBest;//根据是否商务标确定下一步评标用哪个aspx(判断在前台) PageSizeList = 20; int page = PageNo ?? 1; int userid = Int32.Parse(CurrentUserInfo.UserID); Hashtable ecechtparm = new Hashtable(); ecechtparm["pid"] = id.Value; ecechtparm["name"] = EnterPriseMemberInfo.EnterpriseName; int eid = 0; //if(IsStandard == 1) //{ EnterpriseCode ec = new EnterpriseCodeDao().FindByEnterprise(EnterPriseMemberInfo.EnterpriseName).First(); eid = ec.ID; //} //else //{ // EnterpriseCodeProject ec = EmedEvaluationProjectMapper.Get().QueryForObject<EnterpriseCodeProject>("EnterpriseCodeProject.Findecode", ecechtparm); //eid = ec.ID; //} //获得场景列表 Hashtable ht = new Hashtable(); ht["eid"] = eid; ht["pid"] = id.Value; int scenecount = EmedEvaluationProjectMapper.Get().QueryForObject<int>("Scene.AllCount", ht); StringBuilder html = new StringBuilder(); //string html = string.Empty; if (scenecount > 0) { IList<IDictionary> scenelist = EmedEvaluationProjectMapper.Get().QueryForList<IDictionary>("Scene.AllScene", ht); if (IsStandard == 1) { foreach (IDictionary s in scenelist) { html.Append("<tr><td><a onclick='return false;' href='" + s["URL"] + "' class='scenelink' />" + s["SceneName"] + "</a></td>"); html.Append("<td>" + new ProjectDao().Find(Int32.Parse(s["ProjectID"].ToString())).Name + "</td>"); html.Append("<td>" + StandardDataMapper.Get().QueryForObject<string>("CompareData.FindName", s["MedicineCode"].ToString()) + "</td>"); html.Append("<td>" + (s["CreateTime"] != null ? s["CreateTime"].ToString() : "") + "</td>"); html.Append("<td>" + (s["Description"] != null ? s["Description"].ToString() : "") + "</td></tr>"); } } else { Hashtable hparm = new Hashtable(); hparm["pid"] = id.Value; foreach (IDictionary s in scenelist) { html.Append("<tr><td><a onclick='return false;' href='" + s["URL"] + "' class='scenelink' />" + s["SceneName"] + "</a></td>"); html.Append("<td>" + new ProjectDao().Find(Int32.Parse(s["ProjectID"].ToString())).Name + "</td>"); hparm["mcode"] = s["MedicineCode"].ToString(); html.Append("<td>" + EmedEvaluationProjectMapper.Get().QueryForObject<string>("CompareDataProject.FindName", hparm) + "</td>"); html.Append("<td>" + (s["CreateTime"] != null ? s["CreateTime"].ToString() : "") + "</td>"); html.Append("<td>" + (s["Description"] != null ? s["Description"].ToString() : "") + "</td></tr>"); } } } ViewData["html"] = html.ToString(); //获得场景列表--完 //int memberid = ec.ID; //得到授权产品的列表 Hashtable aphtparm = new Hashtable(); aphtparm["pid"] = id; aphtparm["eid"] = eid; aphtparm["start"] = PageSizeList * (page - 1) + 1; //记录开始数 aphtparm["end"] = page * PageSizeList; //记录结束数 Dictionary<string, string> dict = ParmHelper.Analysis(collection); if (dict.Count == 0 && parm == null) { IList<IDictionary> medicinebaseidlist = EmedEvaluationProjectMapper.Get().QueryForList<IDictionary>("AuthorizationProject.queryid", aphtparm); int count = EmedEvaluationProjectMapper.Get().QueryForObject<int>("AuthorizationProject.queryidcount", aphtparm); PagedList<IDictionary> list = new PagedList<IDictionary>( medicinebaseidlist, page, PageSizeList, count); for (int i = 0; i < list.Count; i++) { Hashtable htc = new Hashtable(); htc["pid"] = aphtparm["pid"]; htc["itemid"] = list[i]["ProductCode"].ToString().Substring(0, 15); list[i]["CompeteCount"] = EmedEvaluationProjectMapper.Get().QueryForObject<int>("CompareDataProject.GetCompeteCount", htc); } ViewData["Count"] = count; ViewData["Projectid"] = id.Value; return View(list); } if (dict.Count == 0 && parm != null) { Dictionary<string, string> use = ParmHelper.AnalysisParm(parm); ViewData["Form"] = use; foreach (KeyValuePair<string, string> k in use) { aphtparm.Add(k.Key, k.Value); } IList<IDictionary> medicinebaseidlist = EmedEvaluationProjectMapper.Get().QueryForList<IDictionary>("AuthorizationProject.queryid", aphtparm); int count = EmedEvaluationProjectMapper.Get().QueryForObject<int>("AuthorizationProject.queryidcount", aphtparm); PagedList<IDictionary> list = new PagedList<IDictionary>( medicinebaseidlist, page, PageSizeList, count); for (int i = 0; i < list.Count; i++) { Hashtable htc = new Hashtable(); htc["pid"] = aphtparm["pid"]; htc["itemid"] = list[i]["ProductCode"].ToString().Substring(0, 15); list[i]["CompeteCount"] = EmedEvaluationProjectMapper.Get().QueryForObject<int>("CompareDataProject.GetCompeteCount", htc); } ViewData["Count"] = count; ViewData["Projectid"] = id.Value; return View(list); } else { if (dict.Count != 0) { string parmeter = ParmHelper.BuildParm(dict); return RedirectToAction("Detail", new { id = id.Value, PageNo = 1, parm = parmeter }); } } //得到授权产品的列表--完 return View(); }
public ActionResult Step4(int? Projectid, string itemid, int? scene, FormCollection collection) { Dictionary<string, string> sitemaster = GetSiteMaster(); ViewData["uid"] = sitemaster["userid"]; bool needregion = false; //此项目是否启用标准化 Project pro = new ProjectDao().Find(Projectid.Value); int IsStandard = pro.IsStandard; Hashtable ht = new Hashtable(); ht["pid"] = Projectid.Value; ht["itemid"] = itemid; IDictionary medicineinfo = (IsStandard == 1) ? StandardDataMapper.Get().QueryForObject<IDictionary>("CompareData.ListSingleName", itemid) : EmedEvaluationProjectMapper.Get().QueryForObject<IDictionary>("CompareDataProject.ListSingleName", ht); ViewData["ProjectRule"] = pro.ProjectRule; ViewData["medicineinfo"] = medicineinfo; ViewData["Projectid"] = Projectid.Value; ViewData["IsBusseniss"] = pro.IsBussiness * pro.IsBest; int IsBest = pro.IsBest; ViewData["IsBest"] = pro.IsBest; ViewData["ProductID"] = itemid; ViewData["Detail"] = ""; if (scene != null) { ViewData["Detail"] = EmedEvaluationProjectMapper.Get().QueryForObject<string>("Scene.FindByScenceNo", scene.Value); } IList<PointCategory> pointcategorylist = new PointCategoryDao().FindByProjectOid(Projectid.Value); StringBuilder CategoryHtml = new StringBuilder(); StringBuilder PointHtml = new StringBuilder(); int totalpointNum = 0; foreach (PointCategory p in pointcategorylist) { if (p.Name == "价格分") needregion = true; int pointnum = EmedEvaluationProjectMapper.Get().QueryForObject<int>("Point.count", p.ID); IList<Point> plist = new PointDao().FindByCategoryID(p.ID); int count = 0; foreach (Point pp in plist) { count++; if (pp.Iseorp == 1) PointHtml.Append("<td nowrap='nowrap'><Label style='cursor:pointer;text-decoration:underline;' class='pointdetail'>指标" + count + "</Lable><input type='hidden' class='pointname' value='" + pp.Name + "' /><br /><input pointid='" + pp.ID + "' class='usedatabase' type='button' value='自动打分' Field='" + pp.Field + "' Eorp='" + pp.EORP + "'></td>"); else PointHtml.Append("<td nowrap='nowrap'><Label style='cursor:pointer;text-decoration:underline;' class='pointdetail'>指标" + count + "</Lable><input type='hidden' class='pointname' value='" + pp.Name + "' /></td>"); } CategoryHtml.Append("<td class='bidpoint' nowrap='nowrap' colspan='" + pointnum + "'>" + p.Name + "</td>"); totalpointNum += pointnum; } string temp = string.Empty; foreach (PointCategory p in pointcategorylist) { if (p.Name != "价格分") temp += p.Name + "+"; PointHtml.Append("<td nowrap='nowrap'>" + p.Name + "(总计)" + "</td>"); } PointHtml.Append("<td nowrap='nowrap'>" + temp.Substring(0, temp.Length - 1) + "</td>"); ViewData["CategoryHtml"] = CategoryHtml.ToString(); ViewData["CategoryCount"] = totalpointNum; if (IsBest == 1) ViewData["ScoreCount"] = pointcategorylist.Count + 5; else ViewData["ScoreCount"] = pointcategorylist.Count + 4; ViewData["PointHtml"] = PointHtml.ToString(); StringBuilder content = new StringBuilder(); Hashtable elhtparm = new Hashtable(); //elhtparm["pc"]=itemid.Substring(0,15); elhtparm["pid"] = Projectid.Value; elhtparm["ownitem"] = itemid; elhtparm["ownid"] = itemid.Substring(15, 12); elhtparm["uid"] = sitemaster["userid"]; //IList<int> enterpriselist = EmedEvaluationProjectMapper.Get().QueryForList<int>("AuthorizationProject.queryenterpriseid", elhtparm); List<string> mclist = new List<string>(); mclist.Add(itemid.Substring(0, 15)); elhtparm["mcodes"] = mclist.ToArray(); IList<IDictionary> enterpriselist = new List<IDictionary>(); if (IsStandard == 1) enterpriselist = EmedEvaluationProjectMapper.Get().QueryForList<IDictionary>("SelfDefineCompete.queryenterpriseid", elhtparm); else enterpriselist = EmedEvaluationProjectMapper.Get().QueryForList<IDictionary>("SelfDefineCompete.queryenterpriseidex", elhtparm); StringBuilder EnterpriseList = new StringBuilder(); content.Append("<tr id='OwnProduct' class='sort'>"); Hashtable ecphtparm = new Hashtable(); ecphtparm["pid"] = Projectid.Value; ecphtparm["ec"] = itemid.Substring(15, 12); //string ownenterprise = (IsStandard == 1) ? new EnterpriseCodeDao().FindByEnterpiseCode(itemid.Substring(15, 12)).First().Enterprise : EmedEvaluationProjectMapper.Get().QueryForObject<string>("EnterpriseCodeProject.Findename",ecphtparm); string ownenterprise = new EnterpriseCodeDao().FindByEnterpiseCode(itemid.Substring(15, 12)).First().Enterprise; EnterpriseList.Append("<tr><td>" + ownenterprise + "</td></tr>"); if (IsStandard == 1) content.Append("<td nowrap='nowrap' id='Own' style='display:none;'>" + ownenterprise + "<input type='hidden' class='pc' value='" + itemid + "' /><input type='hidden' export='excel' value='" + ownenterprise + "' /></td>"); else content.Append("<td nowrap='nowrap' id='Own' style='display:none;'>" + ownenterprise + "<input type='hidden' class='pc' value='" + medicineinfo["StandardProductCode"] + "' /><input type='hidden' export='excel' value='" + ownenterprise + "' /></td>"); foreach (PointCategory p in pointcategorylist) { IList<Point> plist = new PointDao().FindByCategoryID(p.ID); foreach (Point pp in plist) { IList<SmallPoint> splist = new SmallPointDao().FindByPointID(pp.ID); content.Append("<td nowrap='nowrap' eid='" + itemid.Substring(15, 12) + "' class='" + pp.ID + "'>"); string defaultvalue = string.Empty; if (pp.Method != 3) { char sptitle = 'A'; foreach (SmallPoint sp in splist) { if (sp.IsDefault.HasValue && sp.IsDefault.Value == 1) { content.Append("<input BigCategory='" + p.ID + "' Score='" + sp.Score + "' type='radio' checked='checked' class='smallpoint' name='" + itemid.Substring(15, 12) + sp.PointID + "' value='" + sp.Score + "' /><Span><Label style='cursor:pointer;text-decoration:underline;' class='smallpointdetail'>" + sptitle + ".</Label><input type='hidden' class='pointname' value='" + sp.Name + "' /></Span><br />"); defaultvalue = sp.Score.Value.ToString(); } else content.Append("<input BigCategory='" + p.ID + "' Score='" + sp.Score + "' type='radio' checked='unchecked' class='smallpoint' name='" + itemid.Substring(15, 12) + sp.PointID + "' value='" + sp.Score + "' /><Span><Label style='cursor:pointer;text-decoration:underline;' class='smallpointdetail'>" + sptitle + ".</Label><input type='hidden' class='pointname' value='" + sp.Name + "' /></Span><br />"); /*if (sp.Name.Length <= 8) { if (sp.IsDefault.HasValue && sp.IsDefault.Value == 1) { content += "<input BigCategory='" + p.ID + "' Score='" + sp.Score + "' type='radio' checked='checked' class='smallpoint' name='" + itemid.Substring(15, 12) + sp.PointID + "' value='" + sp.Score + "' />" + sp.Name + "<br />"; defaultvalue = sp.Score.Value.ToString(); } else content += "<input BigCategory='" + p.ID + "' Score='" + sp.Score + "' type='radio' checked='unchecked' class='smallpoint' name='" + itemid.Substring(15, 12) + sp.PointID + "' value='" + sp.Score + "' />" + sp.Name + "<br />"; } else { if (sp.IsDefault.HasValue && sp.IsDefault.Value == 1) { content += "<input BigCategory='" + p.ID + "' Score='" + sp.Score + "' type='radio' checked='checked' class='smallpoint' name='" + itemid.Substring(15, 12) + sp.PointID + "' value='" + sp.Score + "' />" + sp.Name.Substring(0, 8) + "..." + "<Span><Label style='font-style:italic;cursor:pointer;text-decoration:underline;' class='smallpointdetail'>详细</Label><input type='hidden' class='pointname' value='" + sp.Name + "' /></Span><br />"; defaultvalue = sp.Score.Value.ToString(); } else content += "<input BigCategory='" + p.ID + "' Score='" + sp.Score + "' type='radio' checked='unchecked' class='smallpoint' name='" + itemid.Substring(15, 12) + sp.PointID + "' value='" + sp.Score + "' />" + sp.Name.Substring(0, 8) + "..." + "<Span><Label style='font-style:italic;cursor:pointer;text-decoration:underline;' class='smallpointdetail'>详细</Label><input type='hidden' class='pointname' value='" + sp.Name + "' /></Span><br />"; }*/ sptitle = (char)(((int)sptitle) + 1); } if (pp.FormatID == null) content.Append("<div style='margin-top:20px;'><label style='color:'red;'>得分:</label><input Format='0' CategoryScore='" + p.ID + "' type='text' export='excel' class='score' size='6' value='" + defaultvalue + "'/><div></td>"); else { IDictionary format = EmedEvaluationProjectMapper.Get().QueryForObject<IDictionary>("Format.GetFormat", pp.FormatID); content.Append("<div class='formatinfo'>等待报价前评分</div><div class='formatrealcontent' style='display:none;margin-top:20px;'><input type='button' class='queryprice' value='测算报价'/><br /><label style='color:'red;'>输入价格:</label><input Format='1' CategoryScore='" + p.ID + "' type='text' export='excel' class='score' size='6'/><input keyword='" + format["keyword"] + "' type='hidden' class='format' value='" + format["code"] + "' /></div></td>"); } } else { IDictionary format = EmedEvaluationProjectMapper.Get().QueryForObject<IDictionary>("Format.GetFormat", pp.FormatID); content.Append("<div style='margin-top:20px;'>" + pp.ExtraHtml + "<label style='color:'red;'>输入数值:</label><input Format='0' Method='" + pp.Method + "' type='text' paramnum='" + pp.ParamNum + "' class='inputscore' size='6'/><input keyword='" + format["keyword"] + "' type='hidden' class='format' value='" + format["code"] + "' /></div><div style='margin-top:20px;'><label style='color:'red;'>得分:</label><input Format='0' CategoryScore='" + p.ID + "' type='text' Method='" + pp.Method + "' export='excel' class='score' size='6' value='" + defaultvalue + "'/><div></td>"); } } } foreach (PointCategory p in pointcategorylist) { content.Append("<td export='excel' nowrap='nowrap' percent='" + p.Percentage + "' class='eachcategory' Category='" + p.ID + "'></td>"); } content.Append("<td export='excel' nowrap='nowrap' class='littlesum'></td>"); if (IsBest == 1) content.Append("<td export='excel' class='best' nowrap='nowrap'></td><td export='excel' nowrap='nowrap' class='result'></td><td export='excel' nowrap='nowrap' class='Quote'></td>"); else content.Append("<td export='excel' nowrap='nowrap' class='result'></td><td export='excel' nowrap='nowrap' class='Quote'></td>"); content.Append("<td export='excel' nowrap='nowrap' class='bidresult'></td></tr>"); foreach (IDictionary enterprise in enterpriselist) { string enterid = enterprise["EnterpiseCode"].ToString(); EnterpriseList.Append("<tr><td>" + enterprise["enterprise"] + "</td></tr>"); content.Append("<tr class='sort'>"); content.Append("<td nowrap='nowrap' style='display:none'>" + enterprise["enterprise"] + "<input type='hidden' class='pc' value='" + enterprise["OtherProductcode"].ToString() + "' /><input type='hidden' export='excel' value='" + enterprise["enterprise"] + "' /></td>"); foreach (PointCategory p in pointcategorylist) { IList<Point> plist = new PointDao().FindByCategoryID(p.ID); foreach (Point pp in plist) { IList<SmallPoint> splist = new SmallPointDao().FindByPointID(pp.ID); content.Append("<td nowrap='nowrap' eid='" + enterid + "' class='" + pp.ID + "'>"); string defaultvalue = string.Empty; if (pp.Method != 3) { char sptitle = 'A'; foreach (SmallPoint sp in splist) { /*if (sp.Name.Length <= 8) { if (sp.IsDefault.HasValue && sp.IsDefault.Value == 1) { content += "<input BigCategory='" + p.ID + "' Score='" + sp.Score + "' type='radio' checked='checked' class='smallpoint' name='" + enterid + sp.PointID + "' value='" + sp.Score + "' />" + sp.Name + "<br />"; defaultvalue = sp.Score.Value.ToString(); } else content += "<input BigCategory='" + p.ID + "' Score='" + sp.Score + "' type='radio' checked='unchecked' class='smallpoint' name='" + enterid + sp.PointID + "' value='" + sp.Score + "' />" + sp.Name + "<br />"; } else { if (sp.IsDefault.HasValue && sp.IsDefault.Value == 1) { content += "<input BigCategory='" + p.ID + "' Score='" + sp.Score + "' type='radio' checked='checked' class='smallpoint' name='" + enterid + sp.PointID + "' value='" + sp.Score + "' />" + sp.Name.Substring(0, 8) + "..." + "<Span><Label style='font-style:italic;cursor:pointer;text-decoration:underline;' class='smallpointdetail'>详细</Label><input type='hidden' class='pointname' value='" + sp.Name + "' /></Span><br />"; defaultvalue = sp.Score.Value.ToString(); } else { content += "<input BigCategory='" + p.ID + "' Score='" + sp.Score + "' type='radio' checked='unchecked' class='smallpoint' name='" + enterid + sp.PointID + "' value='" + sp.Score + "' />" + sp.Name.Substring(0, 8) + "..." + "<Span><Label style='font-style:italic;cursor:pointer;text-decoration:underline;' class='smallpointdetail'>详细</Label><input type='hidden' class='pointname' value='" + sp.Name + "' /></Span><br />"; } }*/ if (sp.IsDefault.HasValue && sp.IsDefault.Value == 1) { content.Append("<input BigCategory='" + p.ID + "' Score='" + sp.Score + "' type='radio' checked='checked' class='smallpoint' name='" + enterid + sp.PointID + "' value='" + sp.Score + "' /><Span><Label style='cursor:pointer;text-decoration:underline;' class='smallpointdetail'>" + sptitle + ".</Label><input type='hidden' class='pointname' value='" + sp.Name + "' /></Span><br />"); defaultvalue = sp.Score.Value.ToString(); } else content.Append("<input BigCategory='" + p.ID + "' Score='" + sp.Score + "' type='radio' checked='unchecked' class='smallpoint' name='" + enterid + sp.PointID + "' value='" + sp.Score + "' /><Span><Label style='cursor:pointer;text-decoration:underline;' class='smallpointdetail'>" + sptitle + ".</Label><input type='hidden' class='pointname' value='" + sp.Name + "' /></Span><br />"); sptitle = (char)(((int)sptitle) + 1); } if (pp.FormatID == null) content.Append("<div style='margin-top:20px;'><label style='color:'red;'>得分:</label><input Format='0' CategoryScore='" + p.ID + "' type='text' export='excel' class='score' size='6' value='" + defaultvalue + "' /><div></td>"); else { IDictionary format = EmedEvaluationProjectMapper.Get().QueryForObject<IDictionary>("Format.GetFormat", pp.FormatID); content.Append("<div class='formatinfo'>等待报价前评分</div><div class='formatrealcontent' style='display:none;margin-top:20px;'><input type='button' class='queryprice' value='测算报价'/><br /><label style='color:'red;'>输入价格:</label><input Format='1' CategoryScore='" + p.ID + "' type='text' export='excel' class='score' size='6' /><input type='hidden' class='format' value='" + format["code"] + "' /><div></td>"); } } else { IDictionary format = EmedEvaluationProjectMapper.Get().QueryForObject<IDictionary>("Format.GetFormat", pp.FormatID); content.Append("<div style='margin-top:20px;'>" + pp.ExtraHtml + "<label style='color:'red;'>输入数值:</label><input Format='0' Method='" + pp.Method + "' type='text' paramnum='" + pp.ParamNum + "' class='inputscore' size='6'/><input keyword='" + format["keyword"] + "' type='hidden' class='format' value='" + format["code"] + "' /></div><div style='margin-top:20px;'><label style='color:'red;'>得分:</label><input Format='0' CategoryScore='" + p.ID + "' type='text' Method='" + pp.Method + "' export='excel' class='score' size='6' value='" + defaultvalue + "'/><div></td>"); } } } foreach (PointCategory p in pointcategorylist) { content.Append("<td export='excel' nowrap='nowrap' percent='" + p.Percentage + "' class='eachcategory' Category='" + p.ID + "'></td>"); } content.Append("<td export='excel' nowrap='nowrap' class='littlesum'></td>"); if (IsBest == 1) content.Append("<td export='excel' class='best' nowrap='nowrap'></td><td export='excel' nowrap='nowrap' class='result'></td><td export='excel' nowrap='nowrap' class='Quote'></td>"); else content.Append("<td export='excel' nowrap='nowrap' class='result'></td><td export='excel' nowrap='nowrap' class='Quote'></td>"); content.Append("<td export='excel' nowrap='nowrap' class='bidresult'></td></tr>"); } if (needregion) { ViewData["Regionhtml"] = GetCityRegion(); } ViewData["content"] = content.ToString(); ViewData["EnterpriseList"] = EnterpriseList.ToString(); ViewData["formurl"] = "/SimulationE/Export.mvc/" + Projectid.Value + "/" + itemid; return View(); }