|
|
@@ -139,7 +139,63 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
+ <select id="getCompanyWaitCount" parameterType="com.zhongzheng.modules.top.goods.bo.TopOldOrderQueryBo" resultType="Long">
|
|
|
+ SELECT
|
|
|
+ COUNT(dl.*)
|
|
|
+ FROM
|
|
|
+ top_divide_log dl
|
|
|
+ LEFT JOIN sys_tenant st ON dl.tenant_id = st.tenant_id
|
|
|
|
|
|
+ WHERE
|
|
|
+ dl.divide_type = 1
|
|
|
+ <if test="tenantId != null and tenantId != ''">
|
|
|
+ AND dl.tenant_id = #{tenantId}
|
|
|
+ </if>
|
|
|
+ <if test="billType != null and billType != ''">
|
|
|
+ AND st.bill_type = #{billType}
|
|
|
+ </if>
|
|
|
+ <if test="payStatus != null and payStatus.size()!=0">
|
|
|
+ AND dl.pay_status in
|
|
|
+ <foreach collection="payStatus" item="item" index="index" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="monthTime != null and monthTime.size()!=0">
|
|
|
+ AND dl.month_time in
|
|
|
+ <foreach collection="monthTime" item="item" index="index" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="tenantIds != null and tenantIds.size()!=0">
|
|
|
+ AND dl.tenant_id in
|
|
|
+ <foreach collection="tenantIds" item="item" index="index" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="overPayDay != null ">
|
|
|
+ AND dl.predict_pay_time <![CDATA[ <= ]]> #{overPayDayTime}
|
|
|
+ </if>
|
|
|
+ <if test="notPayStatus != null ">
|
|
|
+ AND dl.pay_status != #{notPayStatus}
|
|
|
+ </if>
|
|
|
+ AND (SELECT
|
|
|
+ count(*)
|
|
|
+ FROM
|
|
|
+ top_divide_log bdl
|
|
|
+ LEFT JOIN top_divide_order btdo ON bdl.id = btdo.divide_log_id
|
|
|
+ LEFT JOIN top_old_order_check_log bcl ON btdo.order_sn = bcl.order_sn
|
|
|
+ WHERE
|
|
|
+ bcl.check_from = 2
|
|
|
+ AND bcl.check_status = 0
|
|
|
+ AND bcl.check_sign = 1
|
|
|
+ <if test="roleIds != null and roleIds.size()!=0">
|
|
|
+ AND bcl.role_id in
|
|
|
+ <foreach collection="roleIds" item="item" index="index" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ AND bdl.id = dl.id)>0
|
|
|
+ </select>
|
|
|
|
|
|
<select id="getCheckList" parameterType="com.zhongzheng.modules.top.financial.bo.TopDivideLogQueryBo" resultType="com.zhongzheng.modules.top.financial.vo.TopDivideLogVo">
|
|
|
SELECT
|
|
|
@@ -334,6 +390,61 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
+ <select id="getSellerListWaitCount" parameterType="com.zhongzheng.modules.top.goods.bo.TopOldOrderQueryBo" resultType="Long">
|
|
|
+ SELECT
|
|
|
+ COUNT(dl.*)
|
|
|
+ FROM
|
|
|
+ top_divide_log dl
|
|
|
+ LEFT JOIN sys_tenant st ON dl.tenant_id = st.tenant_id
|
|
|
+ WHERE
|
|
|
+ dl.divide_type = 2
|
|
|
+ <if test="tenantId != null and tenantId != ''">
|
|
|
+ AND dl.tenant_id = #{tenantId}
|
|
|
+ </if>
|
|
|
+ <if test="payStatus != null and payStatus.size()!=0">
|
|
|
+ AND dl.pay_status in
|
|
|
+ <foreach collection="payStatus" item="item" index="index" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="createNo != null ">
|
|
|
+ AND (dl.create_no = #{createNo} or dl.create_username like concat('%', #{createNo}, '%'))
|
|
|
+ </if>
|
|
|
+ <if test="monthTime != null and monthTime.size()!=0">
|
|
|
+ AND dl.month_time in
|
|
|
+ <foreach collection="monthTime" item="item" index="index" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="tenantIds != null and tenantIds.size()!=0">
|
|
|
+ AND dl.tenant_id in
|
|
|
+ <foreach collection="tenantIds" item="item" index="index" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="notPayStatus != null ">
|
|
|
+ AND dl.pay_status != #{notPayStatus}
|
|
|
+ </if>
|
|
|
+ AND (SELECT
|
|
|
+ count(*)
|
|
|
+ FROM
|
|
|
+ top_divide_log bdl
|
|
|
+ LEFT JOIN top_divide_order btdo ON bdl.id = btdo.divide_log_id
|
|
|
+ LEFT JOIN top_old_order_check_log bcl ON btdo.order_sn = bcl.order_sn
|
|
|
+ WHERE
|
|
|
+ bcl.check_from = 3
|
|
|
+ AND bcl.check_status = 0
|
|
|
+ AND bcl.check_sign = 1
|
|
|
+ <if test="roleIds != null and roleIds.size()!=0">
|
|
|
+ AND bcl.role_id in
|
|
|
+ <foreach collection="roleIds" item="item" index="index" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ AND bdl.id = dl.id)>0
|
|
|
+
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="getCommissionList" parameterType="com.zhongzheng.modules.top.financial.bo.TopDivideOrderQueryBo" resultType="com.zhongzheng.modules.top.financial.vo.TopDivideLogVo">
|
|
|
SELECT
|
|
|
dl.*,
|