|
@@ -17,6 +17,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<result property="payStatus" column="pay_status"/>
|
|
<result property="payStatus" column="pay_status"/>
|
|
<result property="remark" column="remark"/>
|
|
<result property="remark" column="remark"/>
|
|
<result property="deductMoney" column="deduct_money"/>
|
|
<result property="deductMoney" column="deduct_money"/>
|
|
|
|
+ <result property="createUsername" column="create_username"/>
|
|
|
|
+ <result property="createSysUserId" column="create_sys_user_id"/>
|
|
|
|
+ <result property="createNo" column="create_no"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<select id="getCompanyList" parameterType="com.zhongzheng.modules.top.financial.bo.TopDivideLogQueryBo" resultType="com.zhongzheng.modules.top.financial.vo.TopDivideLogVo">
|
|
<select id="getCompanyList" parameterType="com.zhongzheng.modules.top.financial.bo.TopDivideLogQueryBo" resultType="com.zhongzheng.modules.top.financial.vo.TopDivideLogVo">
|
|
@@ -58,6 +61,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
dl.tenant_id
|
|
dl.tenant_id
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
<select id="getCheckList" parameterType="com.zhongzheng.modules.top.financial.bo.TopDivideLogQueryBo" resultType="com.zhongzheng.modules.top.financial.vo.TopDivideLogVo">
|
|
<select id="getCheckList" parameterType="com.zhongzheng.modules.top.financial.bo.TopDivideLogQueryBo" resultType="com.zhongzheng.modules.top.financial.vo.TopDivideLogVo">
|
|
SELECT
|
|
SELECT
|
|
dl.*,
|
|
dl.*,
|
|
@@ -120,4 +125,79 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</if>
|
|
</if>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+ <select id="getSellerList" parameterType="com.zhongzheng.modules.top.financial.bo.TopDivideLogQueryBo" resultType="com.zhongzheng.modules.top.financial.vo.TopDivideLogVo">
|
|
|
|
+ SELECT
|
|
|
|
+ dl.tenant_id,
|
|
|
|
+ dl.create_no,dl.create_username,
|
|
|
|
+ sum(
|
|
|
|
+ IF
|
|
|
|
+ ( pay_status = 1, dl.pay_money, 0 )) AS pay_money_total,
|
|
|
|
+ sum(
|
|
|
|
+ IF
|
|
|
|
+ ( pay_status = 1, dl.deduct_money, 0 )) AS deduct_money_total,
|
|
|
|
+ st.tenant_name
|
|
|
|
+ FROM
|
|
|
|
+ top_divide_log dl
|
|
|
|
+ LEFT JOIN sys_tenant st ON dl.tenant_id = st.tenant_id
|
|
|
|
+ LEFT JOIN
|
|
|
|
+ top_old_order_check_log cl ON dl.id = cl.month_divide_id AND cl.check_sign = 1
|
|
|
|
+ WHERE
|
|
|
|
+ dl.divide_type = 2
|
|
|
|
+ <if test="tenantId != null and tenantId != ''">
|
|
|
|
+ AND dl.tenant_id = #{tenantId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="roleId != null and roleId != ''">
|
|
|
|
+ AND cl.role_id = #{roleId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="checkStatus != null and checkStatus != ''">
|
|
|
|
+ AND cl.check_status in
|
|
|
|
+ <foreach collection="checkStatus" item="item" index="index" open="(" close=")" separator=",">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="monthTime != null and monthTime != ''">
|
|
|
|
+ AND dl.month_time in
|
|
|
|
+ <foreach collection="monthTime" item="item" index="index" open="(" close=")" separator=",">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ GROUP BY
|
|
|
|
+ dl.tenant_id,dl.create_no,dl.create_username
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="getCommissionList" parameterType="com.zhongzheng.modules.top.financial.bo.TopDivideLogQueryBo" resultType="com.zhongzheng.modules.top.financial.vo.TopDivideLogVo">
|
|
|
|
+ SELECT
|
|
|
|
+ dl.tenant_id,
|
|
|
|
+ sum(
|
|
|
|
+ IF
|
|
|
|
+ ( pay_status = 1, dl.pay_money, 0 )) AS pay_money_total,
|
|
|
|
+ st.tenant_name
|
|
|
|
+ FROM
|
|
|
|
+ top_divide_log dl
|
|
|
|
+ LEFT JOIN sys_tenant st ON dl.tenant_id = st.tenant_id
|
|
|
|
+ LEFT JOIN
|
|
|
|
+ top_old_order_check_log cl ON dl.id = cl.month_divide_id AND cl.check_sign = 1
|
|
|
|
+ WHERE
|
|
|
|
+ dl.divide_type = 3
|
|
|
|
+ <if test="tenantId != null and tenantId != ''">
|
|
|
|
+ AND dl.tenant_id = #{tenantId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="roleId != null and roleId != ''">
|
|
|
|
+ AND cl.role_id = #{roleId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="checkStatus != null and checkStatus != ''">
|
|
|
|
+ AND cl.check_status in
|
|
|
|
+ <foreach collection="checkStatus" item="item" index="index" open="(" close=")" separator=",">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="monthTime != null and monthTime != ''">
|
|
|
|
+ AND dl.month_time in
|
|
|
|
+ <foreach collection="monthTime" item="item" index="index" open="(" close=")" separator=",">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ GROUP BY
|
|
|
|
+ dl.tenant_id
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|