-- 部门权限
select coalesce(v.prodline_value_name, 'ALL') as prodlinevaluename,
coalesce(v.subprodline_value_name, 'ALL') as subprodlinevaluename,
coalesce(v.pdu_value_name, 'ALL') as pduvaluename, coalesce(v.region_value_name, 'ALL') as regionvaluename,
coalesce(v.vendor_value_name, 'ALL') as vendorvaluename
from omp_user_privilege_conf_v as v
where v.user_id = '701667279626014'::numeric and v.role_id = '1070'::numeric
-- 招投标
select t.competive_bidding_id as competivebiddingid, t.rpojectid as rpojectid,
(select p.project_mp_requ_number from omp_project_t p where p.project_no = t.rpojectid) as projectmprequnumber,
t.caption as caption, t.project_type as projecttype,
case
when t.project_source = 'newomp' then nvl(
(select org.org_name_zh from omp_local_org_t org where to_char(org.id) = t.prodline), t.prodline)
else t.prodline end prodline,
case
when t.project_source = 'newomp' then nvl(
(select org.org_name_zh from omp_local_org_t org where to_char(org.id) = t.subprodline),
t.subprodline)
else t.subprodline end subprodline,
case
when t.project_source = 'newomp' then nvl(
(select org.org_name_zh from omp_local_org_t org where to_char(org.id) = t.dept), t.dept)
else t.dept end dept,
case
when t.project_source = 'newomp' then nvl(
(select org.org_name_zh from omp_local_org_t org where to_char(org.id) = t.develop), t.develop)
else t.develop end developname, t.business_model as businessmodel, t.site_status as sitestatus,
t.datatype as datatype, t.workaddress as workaddress, t.team_operation_model as teamoperationmodel,
to_char(t.planbegindate, 'yyyy-mm-dd') as planbegindate, to_char(t.planenddate, 'yyyy-mm-dd') as planenddate,
to_char(opt.begin_date, 'yyyy-mm-dd') as realstartdate, to_char(opt.end_date, 'yyyy-mm-dd') as realenddate,
t.tender_type as tendertype, t.rank_type as ranktype, t.type as type,
to_char(t.tender_end_date, 'yyyy-mm-dd') as tenderenddate,
to_char(t.tender_confirm_date, 'yyyy-mm-dd') as tenderconfirmdate,
case t.node
when '1' then '招投标申请'
when '2' then '采购发标'
when '3' then '供方回标'
when '4' then '技术开标'
when '5' then '确认回标'
when '7' then '关闭' end as node, t.work_no as workno, t.work_name as workname, t.remark as remark,
t.winbidding_supply_name as winbiddingsupplyname, t.winbidding_supply_num as winbiddingsupplynum,
to_char(t.creation_date, 'yyyy-mm-dd') as createdate,
to_char(t.last_update_date, 'yyyy-mm-dd') as lastupdatetime, t.requiredyear as requiredyear, t.bg as bg,
t.isinherit as isinherit, t.inheritsupply as inheritsupply, t.budgetprice_notax as budgetpricenotax,
t.isbacktostart as isbacktostart, t.isfailedtoego as isfailedtoego, t.packsendmode as packsendmode,
t.fm_type as fmtype, t.project_source as projectsource, t.keyrole_num as keyrolenum,
t.project_budgetprice as projectbudgetprice, t.bidded_from_rsm biddedfromrsm, t.target_price targetprice,
t.business_remark businessremark, t.first_date firstdate, t.second_date seconddate,
t.has_share_control as hassharecontrol, t.purchase_confirm_role as purchaseconfirmrole,
(select count(1) from omp_project_emp_plan_t ep where ep.project_no = t.rpojectid) as empplancount,
negotia_tion_mode negotiationmode, org_v.l1_org_name as bg, org_v.l2_org_name as bu, org_v.l3_org_name as pdu,
org_v.l4_org_name as develop
from omp_bid_project_t t
left join omp_project_prpo_info_v opt
on t.rpojectid = opt.project_no and opt.project_status not in ('CLOSE', 'DRAFT')
left join omp_local_org_t org_v on org_v.id = opt.local_org_id
left join omp_frame_t ft on t.rpojectid = ft.frame_no and ft.frame_no not in ('CLOSE', 'DRAFT')
left join omp_bid_supply_detail_t sutt
on sutt.competive_bidding_id = t.competive_bidding_id and sutt.supply_num = t.winbidding_supply_num
left join (select p.business_key_, p.proc_inst_id_, wpf.bs_created_by_
from act_hi_procinst p
join act_re_procdef rpd on p.proc_def_id_ = rpd.id_
join tpl_wf_hi_procform_t wpf on p.proc_inst_id_ = wpf.bs_proc_inst_id_
where rpd.key_ in ('BidNewProjectProcess', 'BidExtProjectProcess') and p.business_key_ like 'R%') p1
on p1.business_key_ = t.competive_bidding_id
where t.competive_bidding_id = 'R202509010001' and (p1.bs_created_by_ = 701667279626014 or exists (select 1
from act_hi_identitylink i
where i.proc_inst_id_ = p1.proc_inst_id_
and to_number(i.user_id_) = 701667279626014) or
((1 = 1)))
and rownum = 1
-- 招投标附件
select t.competive_bidding_id as competivebiddingid, t.supply_num as supplynum, t.supply_nme as supplynme,
t.attachmentid as attachmentid, t.file_title as filetitle, t.type as type, t.file_path as filepath
from omp_bid_fiels_t t
where competive_bidding_id = 'R202509010001'
-- 招投标附件
select t.competive_bidding_id as competivebiddingid, t.supply_num as supplynum, t.supply_nme as supplynme,
t.attachmentid as attachmentid, t.file_title as filetitle, t.type as type, tat.filename as filename,
tat.filepath as filepath, tat.batch_id as batchid, tat.download_type as downloadtype
from omp_bid_fiels_t t
left join omp_bid_file_v tat on t.attachmentid = tat.attachmentid
where 1 = 1 and t.competive_bidding_id = 'R202509010001' and lower(t.supply_num) like lower('%' || trim('10000') || '%')
-- 招投标供应商信息
select t.supply_nme as supplynme, t.supply_num as supplynum, t.competive_bidding_id as competivebiddingid,
t.is_give_up as isgiveup, t.counts as counts, t.price as price, t.view_man_score as viewmanscore,
t.project_involves_score as projectinvolvesscore, t.score as score,
to_char(t.back_bidding_date, 'yyyy-mm-dd') as backbiddingdate, t.remark as remark,
t.evaluation_remark as evaluationremark, to_char(t.creation_date, 'yyyy-mm-dd') as createdate,
bp.contact_w3 as contactid, u.lname as contactname, pj.winbidding_supply_name as winbiddingsupplyname,
t.technicalweight as technicalweight, t.commercialweight as commercialweight,
t.commercial_score as commercialscore, t.supply_userid as contactuserid, t.record_num as recordnum
from omp_bid_supply_detail_t t, omp_coop_t bp, omp_bid_project_t pj, tpl_user_t u
where t.supply_num = bp.code and t.competive_bidding_id = pj.competive_bidding_id
and lower(bp.contact_w3) = lower(u.w3_account) and bp.status = 'ACTIVE' and t.competive_bidding_id = 'R202509010001'
order by t.supply_nme asc
-- 招投标日志
select assignee as assignee, task_id as taskid, task_def_name as taskdefname, process_instance_id as processinstanceid,
operation as operation, log.type as type, log.description as description, log.created_by as createdby,
log.creation_date as creationdate, log.last_updated_by as lastupdatedby, log.last_update_date as lastupdatedate,
usr.employee_number as employeenumber
from tpl_wf_log_t log
left join tpl_user_t usr on lower(log.assignee) = lower(trim(usr.lname))
where log.process_instance_id = '173128166' and log.app_name = 'omp'
order by log.creation_date desc
-- 项目信息
select nvl(p.operation_mode_after, p.operation_mode) from omp_project_t p where p.project_no = 'W20250901002N'
-- 研发外包项目需求表
select id as id, project_no as projectno, project_id as projectid, requirement_nane as requirementname,
requirement_desc as requirementdesc, accept_conclusion as acceptconclusion, accept_remark as acceptremark,
accept_date as acceptdate, created_by as createby, creation_date as createdate, last_updated_by as lastupdateby,
last_update_date as lastupdatedate
from omp_reqitem_project_t
where project_no = 'W20250901002N' and delete_flag = 'N'
-- 人力到位月度计划表
select p.project_id as projectid, p.project_no as projectno, p.plan_month as planmonth, p.plan_emp_num as planempnum,
p.actual_emp_num as actualempnum, p.emp_month_rate as empmonthrate, p.emp_rate_policy as empratepolicy,
o.po_num as ponum
from omp_project_emp_plan_t p
left join omp_project_prpo_info_t o on p.project_no = o.app_id
where p.project_id = 'W20250901002N' or p.project_no = 'W20250901002N'
order by p.plan_month
-- 公告表
select t.*, t_update_u.lname as lastupdateusercn
from omp_notice_t t
left join tpl_user_t t_update_u on t.last_updated_by = t_update_u.user_id
where t.delete_flag = 'N' and t.status = 'ACTIVE' and (
(t.status = 'ACTIVE' and t.receive_obj is not null and upper(t.receive_obj) like '%' || upper('HW') || '%') or
(t.receive_role_ids is not null and
(instr(t.receive_role_ids, '1005') > 0 or instr(t.receive_role_ids, '1037') > 0 or
instr(t.receive_role_ids, '1048') > 0 or instr(t.receive_role_ids, '1070') > 0 or
instr(t.receive_role_ids, '1074') > 0 or instr(t.receive_role_ids, '1085') > 0 or
instr(t.receive_role_ids, '1101') > 0 or instr(t.receive_role_ids, '1104') > 0 or
instr(t.receive_role_ids, '1105') > 0 or instr(t.receive_role_ids, '1106') > 0 or
instr(t.receive_role_ids, '1107') > 0 or instr(t.receive_role_ids, '1117') > 0 or
instr(t.receive_role_ids, '1124') > 0 or instr(t.receive_role_ids, '1765') > 0)))
and trunc(t.push_start_date) <= trunc(sysdate) and trunc(t.push_end_date) >= trunc(sysdate)
帮我把上面的SQL中的表,提取成【select * from 表; -- 中文注释】的形式,注意对齐中文注释,用一个SQL框输出给我SQL全部小写