update 企业打包列表返回邮寄联系人信息
This commit is contained in:
+9
@@ -22,6 +22,9 @@
|
||||
project.mail,
|
||||
project.create_time,
|
||||
project.projectType,
|
||||
project.mail_contacts_id,
|
||||
project.mail_contacts_temporary_id,
|
||||
project.mail_contacts_temporary_name,
|
||||
ppcp.come,
|
||||
IF
|
||||
( project.phone = '' or project.phone IS NULL, pcmt.phone, project.phone ) AS phone,
|
||||
@@ -33,6 +36,7 @@
|
||||
<!-- 普通项目-->
|
||||
select c.id,c.charge_project,c.invoice_amount, c.charge_use, c.principal_id,su.realname as principal_name,c.contacts_temporary_id,c.contacts_temporary_name,c.charge_company_temporary_name,c.receivable_amount,
|
||||
if(c.paid_amount is null or c.paid_amount = '','0.00',c.paid_amount) as paid_amount,c.need_invoice,c.pack,c.in_account,c.make_invoice,c.mail,c.create_time,1 as projectType,'' as phone,'' as email,affirm_income
|
||||
,c.mail_contacts_id,c.mail_contacts_temporary_id,c.mail_contacts_temporary_name
|
||||
from pay_common_project c
|
||||
left join sys_user su on c.principal_id = su.id
|
||||
<where>
|
||||
@@ -50,6 +54,7 @@
|
||||
UNION ALL
|
||||
select gsub.id,g.working_group_project,gsub.invoice_amount, gsub.charge_use, g.principal_id_a,su.realname,gsubc.contacts_temporary_id as contacts_temporary_id_one,gsubc.contacts_temporary_name as contacts_temporary_name_one,gsub.charge_company_temporary_name,gsub.receivable_amount,
|
||||
if(gsub.paid_amount is null or gsub.paid_amount = '','0.00',gsub.paid_amount) as paid_amount,gsub.need_invoice,gsub.pack,gsub.in_account,gsub.make_invoice,gsub.mail,gsub.create_time,2,'','',affirm_income
|
||||
,gsub.mail_contacts_id,gsub.mail_contacts_temporary_id,gsub.mail_contacts_temporary_name
|
||||
from pay_working_group g
|
||||
left join sys_user su on g.principal_id_a = su.id
|
||||
inner join pay_working_group_subitem gsub on g.id = gsub.working_group_id
|
||||
@@ -69,6 +74,7 @@
|
||||
UNION ALL
|
||||
select sit.id,meeting.meeting_name,sit.invoice_amount,sit.charge_use, meeting.director_id, su.realname,sit.company_contact_temporary_id,sit.company_contact_name,sit.company_name,sit.amount_receivable,
|
||||
if(sit.paid_amount is null or sit.paid_amount = '','0.00',sit.paid_amount) as paid_amount,sit.need_invoice,sit.pack,sit.in_account,sit.make_invoice,sit.mail,sit.create_time,3,sit.phone,'',affirm_income
|
||||
,sit.post_contact_id as mail_contacts_id,sit.post_contact_temporary_id as mail_contacts_temporary_id,sit.post_contact_name as mail_contacts_temporary_name
|
||||
from pay_meeting meeting
|
||||
left join sys_user su on meeting.director_id = su.id
|
||||
inner join pay_meeting_situation sit on meeting.id = sit.meeting_id
|
||||
@@ -88,6 +94,7 @@
|
||||
UNION ALL
|
||||
select msub.id,pmp.project_name,msub.invoice_amount,msub.charge_use,pmp.director_id, su.realname,msub.company_contact_temporary_id,msub.company_contact_name,msub.company_name,msub.amount_receivable,
|
||||
if(msub.paid_amount is null or msub.paid_amount = '','0.00',msub.paid_amount) as paid_amount,msub.need_invoice,msub.pack,msub.in_account,msub.make_invoice,msub.mail,msub.create_time,4,'','',affirm_income
|
||||
,msub.post_contact_id as mail_contacts_id,msub.post_contact_temporary_id as mail_contacts_temporary_id,msub.post_contact_name as mail_contacts_temporary_name
|
||||
from pay_member_project pmp
|
||||
left join sys_user su on pmp.director_id = su.id
|
||||
inner join pay_member_project_subitem msub on pmp.id = msub.project_id
|
||||
@@ -106,6 +113,7 @@
|
||||
UNION ALL
|
||||
select tmsub.id,tmember.project_name,tmsub.invoice_amount,tmsub.charge_use,tmember.director_id, su.realname,'',tmsub.liaison_man,tmsub.company_name,tmsub.amount_receivable,
|
||||
if(tmsub.paid_amount is null or tmsub.paid_amount = '','0.00',tmsub.paid_amount) as paid_amount,tmsub.invoice_requirements,tmsub.pack,tmsub.in_account,tmsub.make_invoice,tmsub.mail,tmsub.create_time,5,tmsub.mobile,tmsub.email,affirm_income
|
||||
,null as mail_contacts_id,null as mail_contacts_temporary_id,null as mail_contacts_temporary_name
|
||||
from tb_member_project tmember
|
||||
left join sys_user su on tmember.director_id = su.id
|
||||
inner join tb_member_project_subitem tmsub on tmember.id=tmsub.project_id
|
||||
@@ -124,6 +132,7 @@
|
||||
UNION ALL
|
||||
select tcp.id,tmember.project_name,tcp.invoice_amount,tcp.charge_use,tmember.director_id, su.realname,'',tcp.liaison_man,tcp.company_name,tcp.amount_receivable,
|
||||
if(tcp.paid_amount is null or tcp.paid_amount = '','0.00',tcp.paid_amount) as paid_amount,tcp.invoice_requirements,tcp.pack,tcp.in_account,tcp.make_invoice,tcp.mail,tcp.create_time,6,tcp.mobile,tcp.email,affirm_income
|
||||
,null as mail_contacts_id,null as mail_contacts_temporary_id,null as mail_contacts_temporary_name
|
||||
from tb_member_project tmember
|
||||
left join sys_user su on tmember.director_id = su.id
|
||||
inner join tb_certificate_payment tcp on tmember.id = tcp.project_id
|
||||
|
||||
Reference in New Issue
Block a user