|
|
@@ -1271,6 +1271,54 @@
|
|
|
<if test="isFinance == 1"> <!-- 我的结算流水 -->
|
|
|
and b.finance_id = #{aid,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
+ <if test="page_sql != null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="selectBillCount" resultType="java.lang.Integer">
|
|
|
+ select
|
|
|
+ count(0)
|
|
|
+ from
|
|
|
+ t_order_bill a left join t_order b on
|
|
|
+ a.order_no = b.order_no left join user c on
|
|
|
+ a.payee_id = c.id left join user d on
|
|
|
+ a.payer_id = d.id left join admin e on
|
|
|
+ b.finance_id = e.id left join admin f on
|
|
|
+ b.salesman_id = f.id left join department_management g on
|
|
|
+ f.department_id = g.id
|
|
|
+ where 1=1
|
|
|
+ <if test="payeeName != null and payeeName != ''">
|
|
|
+ and c.name = #{payeeName,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="payerName != null and payerName !=''">
|
|
|
+ and d.name = #{payerName,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="salesmanName != null and salesmanName != ''">
|
|
|
+ and f.name = #{salesmanName,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="financeName != null and financeName != ''">
|
|
|
+ and e.name = #{financeName,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="confirmSign != null">
|
|
|
+ and a.confirm_sign = #{confirmSign,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="deleteSign != null">
|
|
|
+ and a.delete_sign = #{deleteSign,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="depId != null and depId != ''">
|
|
|
+ and f.department_id = #{depId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="isFinance == 0"> <!-- 我的订单流水查询 -->
|
|
|
+ and
|
|
|
+ (b.salesman_id = #{aid,jdbcType=VARCHAR}
|
|
|
+ or
|
|
|
+ b.finance_id = #{aid,jdbcType=VARCHAR}
|
|
|
+ or
|
|
|
+ b.technician_id = #{aid,jdbcType=VARCHAR})
|
|
|
+ </if>
|
|
|
+ <if test="isFinance == 1"> <!-- 我的结算流水 -->
|
|
|
+ and b.finance_id = #{aid,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
<select id="selectBillDetail" parameterType="java.lang.String" resultType="com.goafanti.order.bo.BillDetailBo">
|