| @@ -732,14 +732,10 @@ | |||||
| <if test=" null == sortColumns"> order by totalOwe desc </if> | <if test=" null == sortColumns"> order by totalOwe desc </if> | ||||
| </select> | </select> | ||||
| <!--union all | |||||
| select pay_amount money,mm.id from wx_profit_sharing_order pso | |||||
| left join wx_merchant mm on pso.merchant_id=mm.id | |||||
| where pso.sharing_status !=5 | |||||
| --> | |||||
| <select id="getReceiveAndPayBillAsPage" parameterType="com.iformall.domain.vo.WxBillAll" resultType="hashmap"> | <select id="getReceiveAndPayBillAsPage" parameterType="com.iformall.domain.vo.WxBillAll" resultType="hashmap"> | ||||
| select m.id,m.name,ws.shop_number shopNumber,ws.type,m.link_person linkPerson,m.link_phone linkPhone, | |||||
| xb.title business,rc.rental_start_date rentalStartDate,rc.rental_end_date rentalEndDate, | |||||
| select tt.* from ( | |||||
| select m.tenant_id,m.id,m.name,ws.shop_number shopNumber,ws.type,m.link_person linkPerson,m.link_phone linkPhone, | |||||
| xb.title business,rc.rental_start_date rentalStartDate,rc.rental_end_date rentalEndDate,rc.rent_shop_type, | |||||
| round( | round( | ||||
| (select sum(bill.receive_pay) from ( | (select sum(bill.receive_pay) from ( | ||||
| @@ -816,14 +812,15 @@ | |||||
| from wx_merchant m left join wx_merchant_shop wms on wms.merchant_id = m.id left join wx_shop ws on wms.shop_id = ws.id | from wx_merchant m left join wx_merchant_shop wms on wms.merchant_id = m.id left join wx_shop ws on wms.shop_id = ws.id | ||||
| left join wx_business xb on(m.business_id = xb.id) | left join wx_business xb on(m.business_id = xb.id) | ||||
| left join wx_rent_contract rc on(rc.merchant_id = m.id) | left join wx_rent_contract rc on(rc.merchant_id = m.id) | ||||
| where 1=1 | |||||
| <if test=" null != tenantId"> and m.tenant_id = #{tenantId} </if> | |||||
| <if test=" null != merchantId"> and m.id = #{merchantId} </if> | |||||
| <if test=" null != merchantName"> and m.name like concat('%', #{merchantName},'%') </if> | |||||
| <if test=" null != rentShopType"> and rc.rent_shop_type = #{rentShopType} </if> | |||||
| ) tt where tt.receivePay >0 and tt.payOut>0 | |||||
| <if test=" null != tenantId"> and tt.tenant_id = #{tenantId} </if> | |||||
| <if test=" null != merchantId"> and tt.id = #{merchantId} </if> | |||||
| <if test=" null != merchantName"> and tt.name like concat('%', #{merchantName},'%') </if> | |||||
| <if test=" null != rentShopType"> and tt.rent_shop_type = #{rentShopType} </if> | |||||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | <if test=" null != sortColumns"> order by ${sortColumns} </if> | ||||
| <if test=" null == sortColumns"> order by m.id desc </if> | |||||
| <if test=" null == sortColumns"> order by tt.id desc </if> | |||||
| </select> | </select> | ||||
| <select id="allDepositList" parameterType="com.iformall.domain.vo.WxBillAll" resultType="hashmap"> | <select id="allDepositList" parameterType="com.iformall.domain.vo.WxBillAll" resultType="hashmap"> | ||||