/// <summary> /// 根据品种名得到其对应的合约 /// </summary> /// <param name="species"></param> private List <string> GetContractBySpeciesName(string species, out string ZLCode) { //先得到中文名 string chineseName = CodeSetManager.GetSpeciChineseName(species); string otherCode = ""; if (speciesNameDict.ContainsKey(chineseName)) { SpeciesItem si = speciesNameDict[chineseName]; if (species.Equals(si.code)) { otherCode = si.otherCode; } else if (species.Equals(si.otherCode)) { otherCode = si.code;; } } List <Contract> codeInfos = CodeSetManager.GetCodeListBySpecies(species); List <Contract> codeInfo2 = CodeSetManager.GetCodeListBySpecies(otherCode); if (codeInfo2 != null) { codeInfos.AddRange(codeInfo2); } //List<string> zhuliCodes = HQService.HQServ.GetZhuliCode(); ZLCode = ""; //foreach (String codeInfo in zhuliCodes) //{ // string name = GetValidSpeciesName(codeInfo); // if (name.Equals(species)) // { // ZLCode = codeInfo; // break; // } //} List <string> ret = new List <string>(); if (codeInfos != null) { foreach (Contract cif in codeInfos) { ret.Add(cif.Code); } } return(ret); }