public ORDER_TASK_INFORMATIONShow UpdateDataByID(string id) { Common.Account account = GetCurrentAccount(); string UNDERTAKE_LABORATORYID = string.Empty; string ORDER_STATUS = string.Empty; APPLIANCE_DETAIL_INFORMATION queryData = m_BLL.GetById(id);//查询器具明细表数据 foreach (var item in queryData.APPLIANCE_LABORATORY) { UNDERTAKE_LABORATORYID += item.UNDERTAKE_LABORATORYID + ",";//实验室 if (item.UNDERTAKE_LABORATORYID == account.UNDERTAKE_LABORATORYName) { ORDER_STATUS = item.ORDER_STATUS;//器具状态 } } ORDER_TASK_INFORMATIONShow ordershow = new ORDER_TASK_INFORMATIONShow(); ordershow.ID = queryData.ORDER_TASK_INFORMATION.ID; //委托单id ordershow.ACCEPT_ORGNIZATION = queryData.ORDER_TASK_INFORMATION.ACCEPT_ORGNIZATION; //受理单位 ordershow.INSPECTION_ENTERPRISE = queryData.ORDER_TASK_INFORMATION.INSPECTION_ENTERPRISE; //送检单位 ordershow.INSPECTION_ENTERPRISE_ADDRESS = queryData.ORDER_TASK_INFORMATION.INSPECTION_ENTERPRISE_ADDRESS; //送检单位地址 ordershow.INSPECTION_ENTERPRISE_POST = queryData.ORDER_TASK_INFORMATION.INSPECTION_ENTERPRISE_POST; //送检单位邮政编码 ordershow.CONTACTS = queryData.ORDER_TASK_INFORMATION.CONTACTS; //联系人 ordershow.CONTACT_PHONE = queryData.ORDER_TASK_INFORMATION.CONTACT_PHONE; //联系电话 ordershow.FAX = queryData.ORDER_TASK_INFORMATION.FAX; //传真 ordershow.CERTIFICATE_ENTERPRISE = queryData.ORDER_TASK_INFORMATION.CERTIFICATE_ENTERPRISE; //证书单位 ordershow.CERTIFICATE_ENTERPRISE_ADDRESS = queryData.ORDER_TASK_INFORMATION.CERTIFICATE_ENTERPRISE_ADDRESS; //证书单位地址 ordershow.CERTIFICATE_ENTERPRISE_POST = queryData.ORDER_TASK_INFORMATION.CERTIFICATE_ENTERPRISE_POST; //证书单位邮政编码 ordershow.CONTACTS2 = queryData.ORDER_TASK_INFORMATION.CONTACTS2; //联系人2 ordershow.CONTACT_PHONE2 = queryData.ORDER_TASK_INFORMATION.CONTACT_PHONE2; //联系电话2 ordershow.FAX2 = queryData.ORDER_TASK_INFORMATION.FAX2; //传真2 ordershow.CUSTOMER_SPECIFIC_REQUIREMENTS = queryData.ORDER_TASK_INFORMATION.CUSTOMER_SPECIFIC_REQUIREMENTS; //客户特殊要求 ordershow.APPLIANCE_DETAIL_INFORMATIONShows.Add(new APPLIANCE_DETAIL_INFORMATIONShow() { ID = queryData.ID, //器具明细id APPLIANCE_NAME = queryData.APPLIANCE_NAME, //器具名称 VERSION = queryData.VERSION, //型号 FORMAT = queryData.FORMAT, //规格 FACTORY_NUM = queryData.FACTORY_NUM, //出厂编号 NUM = queryData.NUM, //数量 ATTACHMENT = queryData.ATTACHMENT, //附件 APPEARANCE_STATUS = queryData.APPEARANCE_STATUS, //外观状态 MAKE_ORGANIZATION = queryData.MAKE_ORGANIZATION, //制造单位 UNDERTAKE_LABORATORYIDString = UNDERTAKE_LABORATORYID, //实验室 REMARKS = queryData.REMARKS, //备注 ORDER_STATUS = ORDER_STATUS //状态 }); return(ordershow); }
public ORDER_TASK_INFORMATIONShow PostID(string id) { var data = new ORDER_TASK_INFORMATIONShow(); string UNDERTAKE_LABORATORYID = string.Empty; string ORDER_STATUS = string.Empty; string ORDER_STATUS_NAME = string.Empty; ORDER_TASK_INFORMATION queryData = m_BLL.GetById(id); string tiqu = string.Empty;//提取日期 foreach (var s in queryData.APPLIANCE_DETAIL_INFORMATION) { UNDERTAKE_LABORATORYID = null; ORDER_STATUS = null; ORDER_STATUS_NAME = null; List <APPLIANCE_LABORATORY> list = m_BLL3.GetByRefAPPLIANCE_DETAIL_INFORMATIOID(s.ID); foreach (var item2 in list) { ORDER_STATUS += item2.ORDER_STATUS + ","; if (item2.ORDER_STATUS == Common.ORDER_STATUS.已退回.ToString()) { ORDER_STATUS_NAME = item2.UNDERTAKE_LABORATORYID + item2.ORDER_STATUS; } if (string.IsNullOrWhiteSpace(UNDERTAKE_LABORATORYID)) { UNDERTAKE_LABORATORYID = item2.UNDERTAKE_LABORATORYID; } else { UNDERTAKE_LABORATORYID += "," + item2.UNDERTAKE_LABORATORYID; } } if (list.Count > 1) { tiqu = Convert.ToDateTime(queryData.CREATETIME).AddDays(28).ToString("yyyy-MM-dd"); } else { tiqu = Convert.ToDateTime(queryData.CREATETIME).AddDays(14).ToString("yyyy-MM-dd"); } s.UNDERTAKE_LABORATORYID = UNDERTAKE_LABORATORYID; var show = new Models.APPLIANCE_DETAIL_INFORMATIONShow() { ID = s.ID, BAR_CODE_NUM = s.BAR_CODE_NUM, APPLIANCE_NAME = s.APPLIANCE_NAME, VERSION = s.VERSION, FORMAT = s.FORMAT, FACTORY_NUM = s.FACTORY_NUM, NUM = s.NUM, ATTACHMENT = s.ATTACHMENT, APPEARANCE_STATUS = s.APPEARANCE_STATUS, MAKE_ORGANIZATION = s.MAKE_ORGANIZATION, REMARKS = s.REMARKS, END_PLAN_DATE = s.END_PLAN_DATE, ORDER_TASK_INFORMATIONID = s.ORDER_TASK_INFORMATIONID, CREATETIME = s.CREATETIME, CREATEPERSON = s.CREATEPERSON, UPDATETIME = s.UPDATETIME, UPDATEPERSON = s.UPDATEPERSON, APPLIANCE_RECIVE = s.APPLIANCE_RECIVE, APPLIANCE_PROGRESS = s.APPLIANCE_PROGRESS, ISOVERDUE = s.ISOVERDUE, OVERDUE = s.OVERDUE, STORAGEINSTRUCTIONS = s.STORAGEINSTRUCTIONS, STORAGEINSTRUCTI_STATU = s.STORAGEINSTRUCTI_STATU, UNDERTAKE_LABORATORYIDString = UNDERTAKE_LABORATORYID.TrimEnd(','), ORDER_STATUS = ORDER_STATUS, ORDER_STATUS_NAME = ORDER_STATUS_NAME, TIQURIQI = tiqu }; data.APPLIANCE_DETAIL_INFORMATIONShows.Add(show); } data.ID = queryData.ID; data.ORDER_NUMBER = queryData.ORDER_NUMBER; data.ACCEPT_ORGNIZATION = queryData.ACCEPT_ORGNIZATION; data.INSPECTION_ENTERPRISE = queryData.INSPECTION_ENTERPRISE; data.INSPECTION_ENTERPRISE_ADDRESS = queryData.INSPECTION_ENTERPRISE_ADDRESS; data.INSPECTION_ENTERPRISE_POST = queryData.INSPECTION_ENTERPRISE_POST; data.CONTACTS = queryData.CONTACTS; data.CONTACT_PHONE = queryData.CONTACT_PHONE; data.FAX = queryData.FAX; data.CERTIFICATE_ENTERPRISE = queryData.CERTIFICATE_ENTERPRISE; data.CERTIFICATE_ENTERPRISE_ADDRESS = queryData.CERTIFICATE_ENTERPRISE_ADDRESS; data.CERTIFICATE_ENTERPRISE_POST = queryData.CERTIFICATE_ENTERPRISE_POST; data.CONTACTS2 = queryData.CONTACTS2; data.CONTACT_PHONE2 = queryData.CONTACT_PHONE2; data.FAX2 = queryData.FAX2; data.CUSTOMER_SPECIFIC_REQUIREMENTS = queryData.CUSTOMER_SPECIFIC_REQUIREMENTS; data.ORDER_STATUS = queryData.ORDER_STATUS; data.CREATETIME = queryData.CREATETIME; AccountBLL acc = new AccountBLL(); List <string> name = new List <string>(); name.Add(queryData.CREATEPERSON); var myname = acc.GetPictureByName(name)[queryData.CREATEPERSON].MyName; data.CREATEPERSON = myname;///////// data.UPDATETIME = queryData.UPDATETIME; data.UPDATEPERSON = queryData.UPDATEPERSON; return(data); }
public ActionResult Show(string baogaoid, string qijuid) { ORDER_TASK_INFORMATIONShow osi = new ORDER_TASK_INFORMATIONShow(); #region 器具信息数据展示处理 string ORDER_TASK_INFORMATIONID = string.Empty; List <string> Bao = new List <string>(); List <string> Qi = new List <string>(); if (!string.IsNullOrWhiteSpace(baogaoid)) { foreach (var item in baogaoid.Split('|')) { if (!string.IsNullOrWhiteSpace(item)) { ORDER_TASK_INFORMATIONID = item.Split('~')[1]; if (!Bao.Contains(item.Split('~')[0])) { Bao.Add(item.Split('~')[0]); } } } } if (!string.IsNullOrWhiteSpace(qijuid)) { foreach (var item in qijuid.Split('|')) { if (!string.IsNullOrWhiteSpace(item)) { ORDER_TASK_INFORMATIONID = item.Split('~')[1]; if (!Qi.Contains(item.Split('~')[0])) { Qi.Add(item.Split('~')[0]); } } } } int total = 0; if (!string.IsNullOrWhiteSpace(ORDER_TASK_INFORMATIONID)) { List <VQIJULINGQU2> queryData = m_BLL5.GetByParam(null, 1, 100, "DESC", "ID", "ORDER_TASK_INFORMATIONID&" + ORDER_TASK_INFORMATIONID, ref total).Distinct().ToList(); foreach (var q in queryData) { q.REPORTTORECEVESTATE = string.Empty; } foreach (var item in Bao) { foreach (var q in queryData) { if (item == q.PREPARE_SCHEMEID) { q.REPORTTORECEVESTATE = q.REPORTNUMBER; } } } foreach (var item in Qi) { foreach (var q in queryData) { if (item == q.ID) { q.APPLIANCECOLLECTIONSATE = "本次领取"; } } } foreach (var item in queryData) { var vq = new VQIJULINGQU2Show() { ID = item.ID, APPLIANCE_NAME = item.APPLIANCE_NAME, VERSION = item.VERSION, FACTORY_NUM = item.FACTORY_NUM, NUM = item.NUM, ATTACHMENT = item.ATTACHMENT, UNDERTAKE_LABORATORYID = item.UNDERTAKE_LABORATORYID, APPLIANCE_RECIVE = item.APPLIANCE_RECIVE, REPORTNUMBER = item.REPORTNUMBER, REMARKS = item.REMARKS, ORDER_TASK_INFORMATIONID = item.ORDER_TASK_INFORMATIONID, APPLIANCECOLLECTIONSATE = item.APPLIANCECOLLECTIONSATE, REPORTTORECEVESTATE = item.REPORTTORECEVESTATE, PREPARE_SCHEMEID = item.PREPARE_SCHEMEID, REPORTSTATUS = item.REPORTSTATUS, }; osi.VQIJULINGQU2Show.Add(vq); } } #endregion #region 委托单信息数据处理 ORDER_TASK_INFORMATION oti = m_BLL3.GetById(ORDER_TASK_INFORMATIONID); osi.ID = oti.ID; osi.ORDER_NUMBER = oti.ORDER_NUMBER; osi.ACCEPT_ORGNIZATION = oti.ACCEPT_ORGNIZATION; osi.INSPECTION_ENTERPRISE = oti.INSPECTION_ENTERPRISE; osi.INSPECTION_ENTERPRISE_ADDRESS = oti.INSPECTION_ENTERPRISE_ADDRESS; osi.INSPECTION_ENTERPRISE_POST = oti.INSPECTION_ENTERPRISE_POST; osi.CONTACTS = oti.CONTACTS; osi.CONTACT_PHONE = oti.CONTACT_PHONE; osi.FAX = oti.FAX; osi.CERTIFICATE_ENTERPRISE = oti.CERTIFICATE_ENTERPRISE; osi.CERTIFICATE_ENTERPRISE_ADDRESS = oti.CERTIFICATE_ENTERPRISE_ADDRESS; osi.CERTIFICATE_ENTERPRISE_POST = oti.CERTIFICATE_ENTERPRISE_POST; osi.CONTACTS2 = oti.CONTACTS2; osi.CONTACT_PHONE2 = oti.CONTACT_PHONE2; osi.FAX2 = oti.FAX2; osi.CUSTOMER_SPECIFIC_REQUIREMENTS = oti.CUSTOMER_SPECIFIC_REQUIREMENTS; osi.ORDER_STATUS = oti.ORDER_STATUS; osi.CREATETIME = oti.CREATETIME; osi.CREATEPERSON = oti.CREATEPERSON; osi.UPDATETIME = oti.UPDATETIME; osi.UPDATEPERSON = oti.UPDATEPERSON; #endregion ViewBag.Id = osi.ID; ViewBag.Baogaoid = baogaoid; ViewBag.Qijuid = qijuid; return(View(osi)); }