• linq



                List<SearchApplicationResult> results = (from row in query.Where(item => item.DEL_FLG == '0')
                                                         join row_temp in DataContext.TBAARS_COMMITTEE_APPLICATION.AsQueryable().Where(item => item.DEL_FLG == '0') on row.APPLI_NO equals row_temp.APPLI_NO into row_temp2
                                                         from committeeApplication in row_temp2.DefaultIfEmpty()
                                                         join products_temp in productsQuery.Where(item => item.DEL_FLG == '0') on row.APPLI_NO equals products_temp.APPLI_NO into products_temp2
                                                         from products in products_temp2.DefaultIfEmpty()
                                                         join staffs_temp in DataContext.TBCMRS_STF_INFO on row.APPLICANT_STF_CODE equals staffs_temp.STF_CODE into staffs_temp2
                                                         from staffs in staffs_temp2.DefaultIfEmpty()
                                                         join divisions_tmp in DataContext.TBCMRS_CST_INFO on row.APPLICANT_DIVISION equals divisions_tmp.CST_CODE into divisions_temp2
                                                         from divisions in divisions_temp2.DefaultIfEmpty()
                                                         join drugs_temp in DataContext.TBCMRS_DRUG_INFO.AsQueryable().Where(item => item.DEL_FLG == '0') on row.DRUG equals drugs_temp.DRUG_CODE into drugs_temp2
                                                         from drugs in drugs_temp2.DefaultIfEmpty()
                                                         join materialsInfo in DataContext.MATERIALS_INFO on row.MATERIALS_CODE equals materialsInfo.MATERIALS_CODE
                                                         join materialsClassInfo in DataContext.MATERIALS_CLASS_INFO on row.MATERIALS_CLASS_CODE equals materialsClassInfo.MATERIALS_CLASS_CODE
                                                         //join materialsattributes_temp in DataContext.MATERIALS_ATTRIBUTES.AsQueryable().Where(item => item.ABOLITION_FLG != "1") on row.MATERIALS_NO equals materialsattributes_temp.MATERIALS_NO into materialsattributes_temp2
                                                         join materialsattributes_temp in DataContext.MATERIALS_ATTRIBUTES on row.MATERIALS_NO equals materialsattributes_temp.MATERIALS_NO into materialsattributes_temp2
                                                         from materialsattributes in materialsattributes_temp2.DefaultIfEmpty()
                                                         where
                                                         materialsInfo.DEL_FLG == '0'
                                                         && materialsClassInfo.DEL_FLG == '0'
                                                         select new SearchApplicationResult()
                                                         {
                                                             ApplicationNo = row.APPLI_NO,
                                                             ApplicantDivisionName = divisions.SCN_NM_KNJ,
                                                             ApplicantStaffName = staffs.STF_NM_KNJ,
                                                             ApplicationDate = row.APPLICATION_DATE,
                                                             DrugName = drugs.DRUG_NM_KNJ,
                                                             MaterialsInfoName = materialsInfo.MATERIALS_NM_KNJ,
                                                             MaterialsClassInfoName = materialsClassInfo.MATERIALS_CLASS_NM_KNJ,
                                                             MaterialsName = row.MATERIALS_NM_KNJ,
                                                             DiscussionClassName = row.DISCUSSION_CLASS.ToString(),
                                                             UniformCode = row.UNIFORM_CODE,
                                                             OrderPartCode = row.ORDER_PART_CODE,
                                                             CommitteeNo = committeeApplication.COMMITTEE_NO,
                                                             CommitteeDelFlg = committeeApplication.DEL_FLG,
                                                             StaffStaYmd = divisions.STA_YMD,
                                                             StaffEndYmd = divisions.END_YMD,
                                                             ApplicationDivRegDate = row.APPLICANT_DIV_REG_DATE,
                                                             AbolitionFlg = materialsattributes.ABOLITION_FLG,
                                                             //ADD:SCSK:20141028:2-3:START
                                                             PurposeBackground = row.PURPOSE_BACKGROUND
                                                             //ADD:SCSK:20141028:2-3:END
                                                         }).Distinct().ToList<SearchApplicationResult>();

  • 相关阅读:
    ubuntu实时显示网速cpu占用和内存占用率
    删除以....开头的所有文件
    0.0.....1 至 0.99.......9 之间正则
    引入腾讯视频播放,可控制是否暂停播放
    解决微信小程序textarea层级太高遮挡其他组件的问题
    查看某分支推送记录
    小程序下载canvas生成图片
    微信小程序企业付款到个人
    秒 转化为 时:分:秒 ------- 类似倒计时
    iOS--崩溃日志的格式化分析---格式化crash日志
  • 原文地址:https://www.cnblogs.com/haiy/p/4126348.html
Copyright © 2020-2023  润新知