修改bug#41972

This commit is contained in:
梁琦涛
2021-11-03 15:10:03 +08:00
parent d92c07ec29
commit 957f4b43f3
6 changed files with 120 additions and 64 deletions
@@ -4,8 +4,9 @@
<select id="queryProject" resultType="com.jero.project.entity.PayCommonProject">
<!-- 普通项目-->
select c.id,c.charge_project, c.charge_use, c.principal_id,c.principal_name,c.contacts_temporary_id,c.contacts_temporary_name,c.charge_company_temporary_name,c.receivable_amount,c.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,c.remarks,c.contract_num,c.charge_company_temporary_id,c.charge_way,c.files,c.charge_notice_no,c.charge_notice_id,c.year,c.mail_contacts_temporary_name
select c.id,c.charge_project, 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,c.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,c.remarks,c.contract_num,c.charge_company_temporary_id,c.charge_way,c.files,c.charge_notice_no,c.charge_notice_id,c.year,c.mail_contacts_temporary_name
from pay_common_project c
left join sys_user su on c.principal_id = su.id
<where>
<if test="projectId != null and projectId != ''">
AND c.id = #{projectId}
@@ -13,8 +14,9 @@
</where>
<!--工作组项目-->
UNION ALL
select gsub.id,g.working_group_project, gsub.charge_use, g.principal_id_a,g.principal_name_a,gsub.contacts_temporary_id_one,gsub.contacts_temporary_name_one,gsub.charge_company_temporary_name,gsub.receivable_amount,gsub.paid_amount,gsub.need_invoice,gsub.pack,gsub.in_account,gsub.make_invoice,gsub.mail,gsub.create_time,2,'','',gsub.remarks,gsub.contract_num,gsub.charge_company_temporary_id,gsub.charge_way,'',gsub.charge_notice_no,gsub.charge_notice_id,g.year,gsub.mail_contacts_temporary_name
select gsub.id,g.working_group_project, gsub.charge_use, g.principal_id_a,su.realname,gsub.contacts_temporary_id_one,gsub.contacts_temporary_name_one,gsub.charge_company_temporary_name,gsub.receivable_amount,gsub.paid_amount,gsub.need_invoice,gsub.pack,gsub.in_account,gsub.make_invoice,gsub.mail,gsub.create_time,2,'','',gsub.remarks,gsub.contract_num,gsub.charge_company_temporary_id,gsub.charge_way,'',gsub.charge_notice_no,gsub.charge_notice_id,g.year,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
<where>
<if test="projectId != null and projectId != ''">
@@ -23,8 +25,9 @@
</where>
<!-- 会议项目-->
UNION ALL
select sit.id,meeting.meeting_name,sit.charge_use, meeting.director_id, meeting.director_name,sit.company_contact_id,sit.company_contact_name,sit.company_name,sit.amount_receivable,sit.paid_amount,sit.need_invoice,sit.pack,sit.in_account,sit.make_invoice,sit.mail,sit.create_time,3,'','',sit.remark,'',sit.company_id,sit.pay_mode,'','','','',''
select sit.id,meeting.meeting_name,sit.charge_use, meeting.director_id, su.realname,sit.company_contact_id,sit.company_contact_name,sit.company_name,sit.amount_receivable,sit.paid_amount,sit.need_invoice,sit.pack,sit.in_account,sit.make_invoice,sit.mail,sit.create_time,3,'','',sit.remark,'',sit.company_id,sit.pay_mode,'','','','',''
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
<where>
<if test="projectId != null and projectId != ''">
@@ -33,8 +36,9 @@
</where>
<!-- 会员项目-->
UNION ALL
select msub.id,pmp.project_name,msub.charge_use,pmp.director_id,pmp.director_name,msub.company_contact_temporary_id,msub.company_contact_name,msub.company_name,msub.amount_receivable,msub.paid_amount,msub.need_invoice,msub.pack,msub.in_account,msub.make_invoice,msub.mail,msub.create_time,4,'','',msub.remark,msub.contract_no,msub.company_temporary_id,msub.payment_method,'',msub.charge_notice_no,msub.charge_notice_file_id,pmp.particular_year,msub.post_contact_name
select msub.id,pmp.project_name,msub.charge_use,pmp.director_id,su.realname,msub.company_contact_temporary_id,msub.company_contact_name,msub.company_name,msub.amount_receivable,msub.paid_amount,msub.need_invoice,msub.pack,msub.in_account,msub.make_invoice,msub.mail,msub.create_time,4,'','',msub.remark,msub.contract_no,msub.company_temporary_id,msub.payment_method,'',msub.charge_notice_no,msub.charge_notice_file_id,pmp.particular_year,msub.post_contact_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
<where>
<if test="projectId != null and projectId != ''">
@@ -43,8 +47,9 @@
</where>
<!-- 标协会员项目-->
UNION ALL
select tmsub.id,tmember.project_name,tmsub.charge_use,tmember.director_id,tmember.director_name,tmsub.liaison_man_id,tmsub.liaison_man,tmsub.company_name,tmsub.amount_receivable,tmsub.paid_amount,tmsub.invoice_requirements,tmsub.pack,tmsub.in_account,tmsub.make_invoice,tmsub.mail,tmsub.create_time,5,tmsub.mobile,tmsub.email,'','',tmsub.company_id,tmsub.payment_method,'','','',tmember.year,''
select tmsub.id,tmember.project_name,tmsub.charge_use,tmember.director_id,su.realname,tmsub.liaison_man_id,tmsub.liaison_man,tmsub.company_name,tmsub.amount_receivable,tmsub.paid_amount,tmsub.invoice_requirements,tmsub.pack,tmsub.in_account,tmsub.make_invoice,tmsub.mail,tmsub.create_time,5,tmsub.mobile,tmsub.email,'','',tmsub.company_id,tmsub.payment_method,'','','',tmember.year,''
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
<where>
<if test="projectId != null and projectId != ''">
@@ -54,8 +59,9 @@
</select>
<select id="queryProjectList" resultType="com.jero.project.entity.PayCommonProject">
<!-- 普通项目-->
select c.id,c.charge_project, c.charge_use, c.principal_id,c.principal_name,c.contacts_temporary_id,c.contacts_temporary_name,c.charge_company_temporary_name,c.receivable_amount,c.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,c.remarks,c.contract_num,c.charge_company_temporary_id,c.charge_way,c.files
select c.id,c.charge_project, 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,c.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,c.remarks,c.contract_num,c.charge_company_temporary_id,c.charge_way,c.files
from pay_common_project c
left join sys_user su on c.principal_id = su.id
<where>
<if test="list != null and list.size() > 0">
AND c.id in
@@ -66,8 +72,9 @@
</where>
<!--工作组项目-->
UNION ALL
select gsub.id,g.working_group_project, gsub.charge_use, g.principal_id_a,g.principal_name_a,gsub.contacts_temporary_id_one,gsub.contacts_temporary_name_one,gsub.charge_company_temporary_name,gsub.receivable_amount,gsub.paid_amount,gsub.need_invoice,gsub.pack,gsub.in_account,gsub.make_invoice,gsub.mail,gsub.create_time,2,'','',gsub.remarks,gsub.contract_num,gsub.charge_company_temporary_id,gsub.charge_way,''
select gsub.id,g.working_group_project, gsub.charge_use, g.principal_id_a,su.realname,gsub.contacts_temporary_id_one,gsub.contacts_temporary_name_one,gsub.charge_company_temporary_name,gsub.receivable_amount,gsub.paid_amount,gsub.need_invoice,gsub.pack,gsub.in_account,gsub.make_invoice,gsub.mail,gsub.create_time,2,'','',gsub.remarks,gsub.contract_num,gsub.charge_company_temporary_id,gsub.charge_way,''
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
<where>
<if test="list != null and list.size() > 0">
@@ -79,8 +86,9 @@
</where>
<!-- 会议项目-->
UNION ALL
select sit.id,meeting.meeting_name,sit.charge_use, meeting.director_id, meeting.director_name,sit.company_contact_temporary_id,sit.company_contact_name,sit.company_name,sit.amount_receivable,sit.paid_amount,sit.need_invoice,sit.pack,sit.in_account,sit.make_invoice,sit.mail,sit.create_time,3,'','',sit.remark,'',sit.company_temporary_id,sit.pay_mode,''
select sit.id,meeting.meeting_name,sit.charge_use, meeting.director_id, su.realname,sit.company_contact_temporary_id,sit.company_contact_name,sit.company_name,sit.amount_receivable,sit.paid_amount,sit.need_invoice,sit.pack,sit.in_account,sit.make_invoice,sit.mail,sit.create_time,3,'','',sit.remark,'',sit.company_temporary_id,sit.pay_mode,''
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
<where>
<if test="list != null and list.size() > 0">
@@ -92,8 +100,9 @@
</where>
<!-- 会员项目-->
UNION ALL
select msub.id,pmp.project_name,msub.charge_use,pmp.director_id,pmp.director_name,msub.company_contact_temporary_id,msub.company_contact_name,msub.company_name,msub.amount_receivable,msub.paid_amount,msub.need_invoice,msub.pack,msub.in_account,msub.make_invoice,msub.mail,msub.create_time,4,'','',msub.remark,msub.contract_no,msub.company_temporary_id,msub.payment_method,''
select msub.id,pmp.project_name,msub.charge_use,pmp.director_id,su.realname,msub.company_contact_temporary_id,msub.company_contact_name,msub.company_name,msub.amount_receivable,msub.paid_amount,msub.need_invoice,msub.pack,msub.in_account,msub.make_invoice,msub.mail,msub.create_time,4,'','',msub.remark,msub.contract_no,msub.company_temporary_id,msub.payment_method,''
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
<where>
<if test="list != null and list.size() > 0">
@@ -105,8 +114,9 @@
</where>
<!-- 标协会员项目-->
UNION ALL
select tmsub.id,tmember.project_name,tmsub.charge_use,tmember.director_id,tmember.director_name,tmsub.liaison_man_id,tmsub.liaison_man,tmsub.company_name,tmsub.amount_receivable,tmsub.paid_amount,tmsub.invoice_requirements,tmsub.pack,tmsub.in_account,tmsub.make_invoice,tmsub.mail,tmsub.create_time,5,tmsub.mobile,tmsub.email,'','',tmsub.company_id,tmsub.payment_method,''
select tmsub.id,tmember.project_name,tmsub.charge_use,tmember.director_id,su.realname,tmsub.liaison_man_id,tmsub.liaison_man,tmsub.company_name,tmsub.amount_receivable,tmsub.paid_amount,tmsub.invoice_requirements,tmsub.pack,tmsub.in_account,tmsub.make_invoice,tmsub.mail,tmsub.create_time,5,tmsub.mobile,tmsub.email,'','',tmsub.company_id,tmsub.payment_method,''
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
<where>
<if test="list != null and list.size() > 0">