fix 87983 工作组来款详情--金额列排序没有作用

This commit is contained in:
lijiarao
2024-08-02 14:45:37 +08:00
parent 1616ecb636
commit baafad3491
2 changed files with 35 additions and 14 deletions
@@ -52,4 +52,10 @@ public class PayWorkingGroupSubletSearch {
@ApiModelProperty(value = "是否打包") @ApiModelProperty(value = "是否打包")
private String pack; private String pack;
@ApiModelProperty(value = "字段")
private String column;
@ApiModelProperty(value = "排序规则")
private String order;
} }
@@ -132,7 +132,8 @@
</sql> </sql>
<!--工作组详情--> <!--工作组详情-->
<select id="queryPageList2" resultType="com.jero.project.entity.PayWorkGroupSubletStatistics"> <select id="queryPageList2" resultType="com.jero.project.entity.PayWorkGroupSubletStatistics">
SELECT select * from
(SELECT
principalNameId as principalId, principalNameId as principalId,
principalName, principalName,
chargeCompanyTemporaryName, chargeCompanyTemporaryName,
@@ -202,17 +203,37 @@
</if> </if>
</otherwise> </otherwise>
</choose> </choose>
<!--<if test="payWorkingGroupSubletSearch.paymentYear != null and payWorkingGroupSubletSearch.paymentYear != ''">
and DATE_FORMAT (pcpr.payment_date,'%Y') like concat(#{payWorkingGroupSubletSearch.paymentYear}, '%')
<if test="payWorkingGroupSubletSearch.paymentMonth != null and payWorkingGroupSubletSearch.paymentMonth != ''">
and DATE_FORMAT (pcpr.payment_date,'%m') like concat(#{payWorkingGroupSubletSearch.paymentMonth}, '%')
</if>
</if>-->
<if test="payWorkingGroupSubletSearch.pack != null and payWorkingGroupSubletSearch.pack != ''"> <if test="payWorkingGroupSubletSearch.pack != null and payWorkingGroupSubletSearch.pack != ''">
AND pack = #{payWorkingGroupSubletSearch.pack} AND pack = #{payWorkingGroupSubletSearch.pack}
</if> </if>
</where> </where>
group by id group by id) p
<if test="payWorkingGroupSubletSearch.column != null and payWorkingGroupSubletSearch.column != ''">
<if test="payWorkingGroupSubletSearch.column == 'allMoney' and payWorkingGroupSubletSearch.order == 'desc'">
order by allMoney desc
</if>
<if test="payWorkingGroupSubletSearch.column == 'comeAllMoney' and payWorkingGroupSubletSearch.order == 'desc'">
order by comeAllMoney desc
</if>
<if test="payWorkingGroupSubletSearch.column == 'billMoney' and payWorkingGroupSubletSearch.order == 'desc'">
order by billMoney desc
</if>
<if test="payWorkingGroupSubletSearch.column == 'confirmAmount' and payWorkingGroupSubletSearch.order == 'desc'">
order by confirmAmount desc
</if>
<if test="payWorkingGroupSubletSearch.column == 'confirmAmount' and payWorkingGroupSubletSearch.order == 'asc'">
order by confirmAmount
</if>
<if test="payWorkingGroupSubletSearch.column == 'allMoney' and payWorkingGroupSubletSearch.order == 'asc'">
order by allMoney
</if>
<if test="payWorkingGroupSubletSearch.column == 'comeAllMoney' and payWorkingGroupSubletSearch.order == 'asc'">
order by comeAllMoney
</if>
<if test="payWorkingGroupSubletSearch.column == 'billMoney' and payWorkingGroupSubletSearch.order == 'asc'">
order by billMoney
</if>
</if>
</select> </select>
<!--工作组详情总金额--> <!--工作组详情总金额-->
<select id="queryPageList233" resultType="com.jero.statistics.entity.AllMoney"> <select id="queryPageList233" resultType="com.jero.statistics.entity.AllMoney">
@@ -286,12 +307,6 @@
<if test="payWorkingGroupSubletSearch.pack != null and payWorkingGroupSubletSearch.pack != ''"> <if test="payWorkingGroupSubletSearch.pack != null and payWorkingGroupSubletSearch.pack != ''">
AND pack = #{payWorkingGroupSubletSearch.pack} AND pack = #{payWorkingGroupSubletSearch.pack}
</if> </if>
<!--<if test="payWorkingGroupSubletSearch.paymentYear != null and payWorkingGroupSubletSearch.paymentYear != ''">
and DATE_FORMAT (pcpr.payment_date,'%Y') like concat(#{payWorkingGroupSubletSearch.paymentYear}, '%')
<if test="payWorkingGroupSubletSearch.paymentMonth != null and payWorkingGroupSubletSearch.paymentMonth != ''">
and DATE_FORMAT (pcpr.payment_date,'%m') like concat(#{payWorkingGroupSubletSearch.paymentMonth}, '%')
</if>
</if>-->
</where> </where>
group by id) p group by id) p
</select> </select>