fix 个人来款统计详情排序
This commit is contained in:
-2
@@ -198,8 +198,6 @@ public interface PayWorkingGroupMapper extends BaseMapper<PayWorkingGroup> {
|
|||||||
|
|
||||||
List<DepartStatistics> queryPageListForDepartFirstPage();
|
List<DepartStatistics> queryPageListForDepartFirstPage();
|
||||||
|
|
||||||
List<PrincipalPeopleDetail> queryPageListForPrincipalDetailTwo(@Param("principalPeopleDetailSearch") PrincipalPeopleDetailSearch principalPeopleDetailSearch, @Param("ids") ArrayList<String> ids);
|
|
||||||
|
|
||||||
AllMoney queryPageList33(@Param("allProjectStatisticsSearch") AllProjectStatisticsSearch allProjectStatisticsSearch, @Param("idList") List<String> idList);
|
AllMoney queryPageList33(@Param("allProjectStatisticsSearch") AllProjectStatisticsSearch allProjectStatisticsSearch, @Param("idList") List<String> idList);
|
||||||
|
|
||||||
AllMoney queryPageListForCompany33(@Param("companyComeMoneySearch") CompanyComeMoneySearch companyComeMoneySearch, @Param("idList") List<String> idList);
|
AllMoney queryPageListForCompany33(@Param("companyComeMoneySearch") CompanyComeMoneySearch companyComeMoneySearch, @Param("idList") List<String> idList);
|
||||||
|
|||||||
+26
-265
@@ -1167,6 +1167,32 @@
|
|||||||
</when>
|
</when>
|
||||||
</choose>-->
|
</choose>-->
|
||||||
</where>
|
</where>
|
||||||
|
<if test="principalPeopleDetailSearch.column != null and principalPeopleDetailSearch.column != ''">
|
||||||
|
<if test="principalPeopleDetailSearch.column == 'allMoney' and principalPeopleDetailSearch.order == 'desc'">
|
||||||
|
order by allMoney desc
|
||||||
|
</if>
|
||||||
|
<if test="principalPeopleDetailSearch.column == 'comeAllMoney' and principalPeopleDetailSearch.order == 'desc'">
|
||||||
|
order by comeAllMoney desc
|
||||||
|
</if>
|
||||||
|
<if test="principalPeopleDetailSearch.column == 'billMoney' and principalPeopleDetailSearch.order == 'desc'">
|
||||||
|
order by billMoney desc
|
||||||
|
</if>
|
||||||
|
<if test="principalPeopleDetailSearch.column == 'confirmAmount' and principalPeopleDetailSearch.order == 'desc'">
|
||||||
|
order by confirmAmount desc
|
||||||
|
</if>
|
||||||
|
<if test="principalPeopleDetailSearch.column == 'confirmAmount' and principalPeopleDetailSearch.order == 'asc'">
|
||||||
|
order by confirmAmount
|
||||||
|
</if>
|
||||||
|
<if test="principalPeopleDetailSearch.column == 'allMoney' and principalPeopleDetailSearch.order == 'asc'">
|
||||||
|
order by allMoney
|
||||||
|
</if>
|
||||||
|
<if test="principalPeopleDetailSearch.column == 'comeAllMoney' and principalPeopleDetailSearch.order == 'asc'">
|
||||||
|
order by comeAllMoney
|
||||||
|
</if>
|
||||||
|
<if test="principalPeopleDetailSearch.column == 'billMoney' and principalPeopleDetailSearch.order == 'asc'">
|
||||||
|
order by billMoney
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<!-- 个人来款详情总金额-->
|
<!-- 个人来款详情总金额-->
|
||||||
<select id="queryPageListForPrincipalDetail33" resultType="com.jero.statistics.entity.AllMoney">
|
<select id="queryPageListForPrincipalDetail33" resultType="com.jero.statistics.entity.AllMoney">
|
||||||
@@ -1243,271 +1269,6 @@
|
|||||||
</where>
|
</where>
|
||||||
) pp
|
) pp
|
||||||
</select>
|
</select>
|
||||||
<!-- 个人来款详情导出ids-->
|
|
||||||
<select id="queryPageListForPrincipalDetailTwo" resultType="com.jero.statistics.entity.PrincipalPeopleDetail">
|
|
||||||
select * from (SELECT
|
|
||||||
pwgs.create_time as createTime,
|
|
||||||
pwgs.id,
|
|
||||||
pwg.working_group_project as projectName,
|
|
||||||
pwg.principal_id_a as principalId,
|
|
||||||
pwgs.receivable_amount AS allMoney,
|
|
||||||
pwgs.paid_amount AS comeAllMoney,
|
|
||||||
pwgs.charge_use as chargeUse
|
|
||||||
FROM pay_working_group_subitem pwgs
|
|
||||||
inner join pay_working_group pwg on (pwgs.working_group_id=pwg.id)
|
|
||||||
<where>
|
|
||||||
pwg.principal_id_a = #{principalPeopleDetailSearch.principalNameId}
|
|
||||||
<if test="principalPeopleDetailSearch.projectName != null and principalPeopleDetailSearch.projectName != ''">
|
|
||||||
AND pwg.working_group_project LIKE
|
|
||||||
concat('%',concat(#{principalPeopleDetailSearch.projectName},'%'))
|
|
||||||
</if>
|
|
||||||
<if test="principalPeopleDetailSearch.year != null and principalPeopleDetailSearch.year != ''">
|
|
||||||
AND pwg.year LIKE
|
|
||||||
concat(#{principalPeopleDetailSearch.year},'%')
|
|
||||||
</if>
|
|
||||||
<if test="principalPeopleDetailSearch.chargeUse != null and principalPeopleDetailSearch.chargeUse != ''">
|
|
||||||
AND pwgs.charge_use=#{principalPeopleDetailSearch.chargeUse}
|
|
||||||
</if>
|
|
||||||
<if test="principalPeopleDetailSearch.inAccountStatue != null and principalPeopleDetailSearch.inAccountStatue != ''">
|
|
||||||
AND pwgs.in_account=#{principalPeopleDetailSearch.inAccountStatue}
|
|
||||||
</if>
|
|
||||||
<choose>
|
|
||||||
<when test="principalPeopleDetailSearch.allMoney != null and principalPeopleDetailSearch.allMoney != '' and principalPeopleDetailSearch.allMoneyTwo != null and principalPeopleDetailSearch.allMoneyTwo != ''">
|
|
||||||
AND pwgs.receivable_amount >= #{principalPeopleDetailSearch.allMoney} and pwgs.receivable_amount
|
|
||||||
<![CDATA[<]]>=
|
|
||||||
#{principalPeopleDetailSearch.allMoneyTwo}
|
|
||||||
</when>
|
|
||||||
<otherwise>
|
|
||||||
<if test="principalPeopleDetailSearch.allMoney != null and principalPeopleDetailSearch.allMoney != ''">
|
|
||||||
AND pwgs.receivable_amount >= #{principalPeopleDetailSearch.allMoney}
|
|
||||||
</if>
|
|
||||||
<if test="principalPeopleDetailSearch.allMoneyTwo != null and principalPeopleDetailSearch.allMoneyTwo != ''">
|
|
||||||
AND pwgs.receivable_amount <![CDATA[<]]>= #{principalPeopleDetailSearch.allMoneyTwo}
|
|
||||||
</if>
|
|
||||||
</otherwise>
|
|
||||||
</choose>
|
|
||||||
</where>
|
|
||||||
union ALL
|
|
||||||
SELECT
|
|
||||||
pcp.create_time as createTime,
|
|
||||||
pcp.id,
|
|
||||||
pcp.charge_project as projectName,
|
|
||||||
pcp.principal_id as principalId,
|
|
||||||
pcp.receivable_amount AS allMoney,
|
|
||||||
pcp.paid_amount AS comeAllMoney,
|
|
||||||
pcp.charge_use as chargeUse
|
|
||||||
FROM pay_common_project pcp
|
|
||||||
<where>
|
|
||||||
pcp.principal_id = #{principalPeopleDetailSearch.principalNameId}
|
|
||||||
<if test="principalPeopleDetailSearch.projectName != null and principalPeopleDetailSearch.projectName != ''">
|
|
||||||
AND pcp.charge_project LIKE
|
|
||||||
concat('%',concat(#{principalPeopleDetailSearch.projectName},'%'))
|
|
||||||
</if>
|
|
||||||
<if test="principalPeopleDetailSearch.chargeUse != null and principalPeopleDetailSearch.chargeUse != ''">
|
|
||||||
AND pcp.charge_use=#{principalPeopleDetailSearch.chargeUse}
|
|
||||||
</if>
|
|
||||||
<if test="principalPeopleDetailSearch.year != null and principalPeopleDetailSearch.year != ''">
|
|
||||||
AND pcp.year LIKE
|
|
||||||
concat(#{principalPeopleDetailSearch.year},'%')
|
|
||||||
</if>
|
|
||||||
<if test="principalPeopleDetailSearch.inAccountStatue != null and principalPeopleDetailSearch.inAccountStatue != ''">
|
|
||||||
AND pcp.in_account=#{principalPeopleDetailSearch.inAccountStatue}
|
|
||||||
</if>
|
|
||||||
<choose>
|
|
||||||
<when test="principalPeopleDetailSearch.allMoney != null and principalPeopleDetailSearch.allMoney != '' and principalPeopleDetailSearch.allMoneyTwo != null and principalPeopleDetailSearch.allMoneyTwo != ''">
|
|
||||||
AND pcp.receivable_amount >= #{principalPeopleDetailSearch.allMoney} and pcp.receivable_amount
|
|
||||||
<![CDATA[<]]>=
|
|
||||||
#{principalPeopleDetailSearch.allMoneyTwo}
|
|
||||||
</when>
|
|
||||||
<otherwise>
|
|
||||||
<if test="principalPeopleDetailSearch.allMoney != null and principalPeopleDetailSearch.allMoney != ''">
|
|
||||||
AND pcp.receivable_amount >= #{principalPeopleDetailSearch.allMoney}
|
|
||||||
</if>
|
|
||||||
<if test="principalPeopleDetailSearch.allMoneyTwo != null and principalPeopleDetailSearch.allMoneyTwo != ''">
|
|
||||||
AND pcp.receivable_amount <![CDATA[<]]>= #{principalPeopleDetailSearch.allMoneyTwo}
|
|
||||||
</if>
|
|
||||||
</otherwise>
|
|
||||||
</choose>
|
|
||||||
</where>
|
|
||||||
union ALL
|
|
||||||
SELECT
|
|
||||||
pms.create_time as createTime,
|
|
||||||
pms.id,
|
|
||||||
pm.meeting_name as projectName,
|
|
||||||
pm.director_id as principalId,
|
|
||||||
pms.amount_receivable AS allMoney,
|
|
||||||
pms.paid_amount AS comeAllMoney,
|
|
||||||
pms.charge_use as chargeUse
|
|
||||||
FROM pay_meeting pm inner join pay_meeting_situation pms on(pm.id=pms.meeting_id)
|
|
||||||
<where>
|
|
||||||
pm.director_id = #{principalPeopleDetailSearch.principalNameId}
|
|
||||||
<if test="principalPeopleDetailSearch.projectName != null and principalPeopleDetailSearch.projectName != ''">
|
|
||||||
AND pm.meeting_name LIKE
|
|
||||||
concat('%',concat(#{principalPeopleDetailSearch.projectName},'%'))
|
|
||||||
</if>
|
|
||||||
<if test="principalPeopleDetailSearch.chargeUse != null and principalPeopleDetailSearch.chargeUse != ''">
|
|
||||||
AND pms.charge_use=#{principalPeopleDetailSearch.chargeUse}
|
|
||||||
</if>
|
|
||||||
<if test="principalPeopleDetailSearch.year != null and principalPeopleDetailSearch.year != ''">
|
|
||||||
AND pm.particular_year LIKE
|
|
||||||
concat(#{principalPeopleDetailSearch.year},'%')
|
|
||||||
</if>
|
|
||||||
<if test="principalPeopleDetailSearch.inAccountStatue != null and principalPeopleDetailSearch.inAccountStatue != ''">
|
|
||||||
AND pms.in_account=#{principalPeopleDetailSearch.inAccountStatue}
|
|
||||||
</if>
|
|
||||||
<choose>
|
|
||||||
<when test="principalPeopleDetailSearch.allMoney != null and principalPeopleDetailSearch.allMoney != '' and principalPeopleDetailSearch.allMoneyTwo != null and principalPeopleDetailSearch.allMoneyTwo != ''">
|
|
||||||
AND pms.amount_receivable >= #{principalPeopleDetailSearch.allMoney} and pms.amount_receivable
|
|
||||||
<![CDATA[<]]>=
|
|
||||||
#{principalPeopleDetailSearch.allMoneyTwo}
|
|
||||||
</when>
|
|
||||||
<otherwise>
|
|
||||||
<if test="principalPeopleDetailSearch.allMoney != null and principalPeopleDetailSearch.allMoney != ''">
|
|
||||||
AND pms.amount_receivable >= #{principalPeopleDetailSearch.allMoney}
|
|
||||||
</if>
|
|
||||||
<if test="principalPeopleDetailSearch.allMoneyTwo != null and principalPeopleDetailSearch.allMoneyTwo != ''">
|
|
||||||
AND pms.amount_receivable <![CDATA[<]]>= #{principalPeopleDetailSearch.allMoneyTwo}
|
|
||||||
</if>
|
|
||||||
</otherwise>
|
|
||||||
</choose>
|
|
||||||
</where>
|
|
||||||
union ALL
|
|
||||||
SELECT
|
|
||||||
pmps.create_time as createTime,
|
|
||||||
pmps.id,
|
|
||||||
pmp.project_name as projectName,
|
|
||||||
pmp.director_id as principalId,
|
|
||||||
pmps.amount_receivable AS allMoney,
|
|
||||||
pmps.paid_amount AS comeAllMoney,
|
|
||||||
pmps.charge_use as chargeUse
|
|
||||||
FROM pay_member_project pmp inner join pay_member_project_subitem pmps on(pmp.id=pmps.project_id)
|
|
||||||
<where>
|
|
||||||
pmp.director_id = #{principalPeopleDetailSearch.principalNameId}
|
|
||||||
<if test="principalPeopleDetailSearch.projectName != null and principalPeopleDetailSearch.projectName != ''">
|
|
||||||
AND pmp.project_name LIKE
|
|
||||||
concat('%',concat(#{principalPeopleDetailSearch.projectName},'%'))
|
|
||||||
</if>
|
|
||||||
<if test="principalPeopleDetailSearch.chargeUse != null and principalPeopleDetailSearch.chargeUse != ''">
|
|
||||||
AND pmps.charge_use=#{principalPeopleDetailSearch.chargeUse}
|
|
||||||
</if>
|
|
||||||
<if test="principalPeopleDetailSearch.year != null and principalPeopleDetailSearch.year != ''">
|
|
||||||
AND pmp.particular_year LIKE
|
|
||||||
concat(#{principalPeopleDetailSearch.year},'%')
|
|
||||||
</if>
|
|
||||||
<if test="principalPeopleDetailSearch.inAccountStatue != null and principalPeopleDetailSearch.inAccountStatue != ''">
|
|
||||||
AND pmps.in_account=#{principalPeopleDetailSearch.inAccountStatue}
|
|
||||||
</if>
|
|
||||||
<choose>
|
|
||||||
<when test="principalPeopleDetailSearch.allMoney != null and principalPeopleDetailSearch.allMoney != '' and principalPeopleDetailSearch.allMoneyTwo != null and principalPeopleDetailSearch.allMoneyTwo != ''">
|
|
||||||
AND pmps.amount_receivable >= #{principalPeopleDetailSearch.allMoney} and pmps.amount_receivable
|
|
||||||
<![CDATA[<]]>=
|
|
||||||
#{principalPeopleDetailSearch.allMoneyTwo}
|
|
||||||
</when>
|
|
||||||
<otherwise>
|
|
||||||
<if test="principalPeopleDetailSearch.allMoney != null and principalPeopleDetailSearch.allMoney != ''">
|
|
||||||
AND pmps.amount_receivable >= #{principalPeopleDetailSearch.allMoney}
|
|
||||||
</if>
|
|
||||||
<if test="principalPeopleDetailSearch.allMoneyTwo != null and principalPeopleDetailSearch.allMoneyTwo != ''">
|
|
||||||
AND pmps.amount_receivable <![CDATA[<]]>= #{principalPeopleDetailSearch.allMoneyTwo}
|
|
||||||
</if>
|
|
||||||
</otherwise>
|
|
||||||
</choose>
|
|
||||||
</where>
|
|
||||||
union ALL
|
|
||||||
SELECT
|
|
||||||
tmps.create_time as createTime,
|
|
||||||
tmps.id,
|
|
||||||
tmps.company_name as chargeCompanyTemporaryName,
|
|
||||||
tmp.project_name as projectName,
|
|
||||||
tmp.director_id as principalId,
|
|
||||||
tmps.amount_receivable AS allMoney,
|
|
||||||
tmps.paid_amount AS comeAllMoney,
|
|
||||||
tmps.pack as pack,
|
|
||||||
tmps.charge_use as chargeUse
|
|
||||||
FROM tb_member_project tmp inner join tb_member_project_subitem tmps on(tmp.id=tmps.project_id)
|
|
||||||
<where>
|
|
||||||
tmp.director_id = #{principalPeopleDetailSearch.principalNameId}
|
|
||||||
<if test="principalPeopleDetailSearch.projectName != null and principalPeopleDetailSearch.projectName != ''">
|
|
||||||
AND tmp.project_name LIKE
|
|
||||||
concat('%',concat(#{principalPeopleDetailSearch.projectName},'%'))
|
|
||||||
</if>
|
|
||||||
<if test="principalPeopleDetailSearch.chargeUse != null and principalPeopleDetailSearch.chargeUse != ''">
|
|
||||||
AND tmps.charge_use=#{principalPeopleDetailSearch.chargeUse}
|
|
||||||
</if>
|
|
||||||
<if test="principalPeopleDetailSearch.year != null and principalPeopleDetailSearch.year != ''">
|
|
||||||
AND tmp.year LIKE
|
|
||||||
concat(#{principalPeopleDetailSearch.year},'%')
|
|
||||||
</if>
|
|
||||||
<if test="principalPeopleDetailSearch.inAccountStatue != null and principalPeopleDetailSearch.inAccountStatue != ''">
|
|
||||||
AND tmps.in_account=#{principalPeopleDetailSearch.inAccountStatue}
|
|
||||||
</if>
|
|
||||||
<choose>
|
|
||||||
<when test="principalPeopleDetailSearch.allMoney != null and principalPeopleDetailSearch.allMoney != '' and principalPeopleDetailSearch.allMoneyTwo != null and principalPeopleDetailSearch.allMoneyTwo != ''">
|
|
||||||
AND tmps.amount_receivable >= #{principalPeopleDetailSearch.allMoney} and tmps.amount_receivable
|
|
||||||
<![CDATA[<]]>=
|
|
||||||
#{principalPeopleDetailSearch.allMoneyTwo}
|
|
||||||
</when>
|
|
||||||
<otherwise>
|
|
||||||
<if test="principalPeopleDetailSearch.allMoney != null and principalPeopleDetailSearch.allMoney != ''">
|
|
||||||
AND tmps.amount_receivable >= #{principalPeopleDetailSearch.allMoney}
|
|
||||||
</if>
|
|
||||||
<if test="principalPeopleDetailSearch.allMoneyTwo != null and principalPeopleDetailSearch.allMoneyTwo != ''">
|
|
||||||
AND tmps.amount_receivable <![CDATA[<]]>= #{principalPeopleDetailSearch.allMoneyTwo}
|
|
||||||
</if>
|
|
||||||
</otherwise>
|
|
||||||
</choose>
|
|
||||||
</where>
|
|
||||||
union ALL
|
|
||||||
SELECT
|
|
||||||
tmps.create_time as createTime,
|
|
||||||
tmps.id,
|
|
||||||
tmps.company_name as chargeCompanyTemporaryName,
|
|
||||||
tmp.project_name as projectName,
|
|
||||||
tmp.director_id as principalId,
|
|
||||||
tmps.amount_receivable AS allMoney,
|
|
||||||
tmps.paid_amount AS comeAllMoney,
|
|
||||||
tmps.pack as pack,
|
|
||||||
tmps.charge_use as chargeUse
|
|
||||||
FROM tb_member_project tmp inner join tb_certificate_payment tmps on(tmp.id=tmps.project_id)
|
|
||||||
<where>
|
|
||||||
tmp.director_id = #{principalPeopleDetailSearch.principalNameId}
|
|
||||||
<if test="principalPeopleDetailSearch.projectName != null and principalPeopleDetailSearch.projectName != ''">
|
|
||||||
AND tmp.project_name LIKE
|
|
||||||
concat('%',concat(#{principalPeopleDetailSearch.projectName},'%'))
|
|
||||||
</if>
|
|
||||||
<if test="principalPeopleDetailSearch.year != null and principalPeopleDetailSearch.year != ''">
|
|
||||||
AND tmp.year LIKE
|
|
||||||
concat(#{principalPeopleDetailSearch.year},'%')
|
|
||||||
</if>
|
|
||||||
<if test="principalPeopleDetailSearch.chargeUse != null and principalPeopleDetailSearch.chargeUse != ''">
|
|
||||||
AND tmps.charge_use=#{principalPeopleDetailSearch.chargeUse}
|
|
||||||
</if>
|
|
||||||
<if test="principalPeopleDetailSearch.inAccountStatue != null and principalPeopleDetailSearch.inAccountStatue != ''">
|
|
||||||
AND tmps.in_account=#{principalPeopleDetailSearch.inAccountStatue}
|
|
||||||
</if>
|
|
||||||
<choose>
|
|
||||||
<when test="principalPeopleDetailSearch.allMoney != null and principalPeopleDetailSearch.allMoney != '' and principalPeopleDetailSearch.allMoneyTwo != null and principalPeopleDetailSearch.allMoneyTwo != ''">
|
|
||||||
AND tmps.amount_receivable >= #{principalPeopleDetailSearch.allMoney} and tmps.amount_receivable
|
|
||||||
<![CDATA[<]]>=
|
|
||||||
#{principalPeopleDetailSearch.allMoneyTwo}
|
|
||||||
</when>
|
|
||||||
<otherwise>
|
|
||||||
<if test="principalPeopleDetailSearch.allMoney != null and principalPeopleDetailSearch.allMoney != ''">
|
|
||||||
AND tmps.amount_receivable >= #{principalPeopleDetailSearch.allMoney}
|
|
||||||
</if>
|
|
||||||
<if test="principalPeopleDetailSearch.allMoneyTwo != null and principalPeopleDetailSearch.allMoneyTwo != ''">
|
|
||||||
AND tmps.amount_receivable <![CDATA[<]]>= #{principalPeopleDetailSearch.allMoneyTwo}
|
|
||||||
</if>
|
|
||||||
</otherwise>
|
|
||||||
</choose>
|
|
||||||
</where>
|
|
||||||
) pp
|
|
||||||
<if test="ids!= null and ids != ''">where pp.id in <foreach collection="ids" item="item" close=")" open="("
|
|
||||||
separator=",">#{item}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
<!--企业来款统计-->
|
<!--企业来款统计-->
|
||||||
<select id="queryPageListForCompany" resultType="com.jero.statistics.entity.CompanyComeMoneyList">
|
<select id="queryPageListForCompany" resultType="com.jero.statistics.entity.CompanyComeMoneyList">
|
||||||
|
|||||||
Reference in New Issue
Block a user