|
@@ -224,7 +224,7 @@
|
|
|
'YYYYMMDD'),'iw')+3,'yyyy') || to_char(to_date(#{vo.cycletime},
|
|
'YYYYMMDD'),'iw')+3,'yyyy') || to_char(to_date(#{vo.cycletime},
|
|
|
'YYYYMMDD'), 'iw') from dual)
|
|
'YYYYMMDD'), 'iw') from dual)
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="vo.tradedate !=null and vo.tradedate != ''">
|
|
|
|
|
|
|
+ <if test="vo.trade date !=null and vo.tradedate != ''">
|
|
|
and t.cycletime = #{vo.tradedate}
|
|
and t.cycletime = #{vo.tradedate}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="vo.areaid != null">
|
|
<if test="vo.areaid != null">
|
|
@@ -1420,9 +1420,9 @@
|
|
|
to_date(#{vo.startDate},'yyyy-MM-dd')
|
|
to_date(#{vo.startDate},'yyyy-MM-dd')
|
|
|
and to_date(#{vo.endDate},'yyyy-MM-dd')
|
|
and to_date(#{vo.endDate},'yyyy-MM-dd')
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="vo.bankname != null and vo.bankname !=''">
|
|
|
|
|
|
|
+ <if test="vo.cusbankname != null and vo.cusbankname !=''">
|
|
|
and (bi.bankname like
|
|
and (bi.bankname like
|
|
|
- '%'||#{vo.bankname}||'%')
|
|
|
|
|
|
|
+ '%'||#{vo.cusbankname}||'%')
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
order by r.tradedate desc
|
|
order by r.tradedate desc
|
|
@@ -1431,4 +1431,95 @@
|
|
|
<select id="execReportMonthType" parameterType="java.util.HashMap" statementType="CALLABLE">
|
|
<select id="execReportMonthType" parameterType="java.util.HashMap" statementType="CALLABLE">
|
|
|
<![CDATA[{call PKG_HIS_REPORT_TABLE.PROC_HIS_REPORT_TABLE_MONTH(#{tradedate,mode=IN,jdbcType=DATE})}]]>
|
|
<![CDATA[{call PKG_HIS_REPORT_TABLE.PROC_HIS_REPORT_TABLE_MONTH(#{tradedate,mode=IN,jdbcType=DATE})}]]>
|
|
|
</select>
|
|
</select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="queryByDate" resultType="com.muchinfo.mtp3pojos.vo.reportform.ShareAmountQueryResult">
|
|
|
|
|
+ select
|
|
|
|
|
+ r.tradedate as cycletime,
|
|
|
|
|
+ r.areaid,
|
|
|
|
|
+ r.areatype,
|
|
|
|
|
+ r.areaaccountid,
|
|
|
|
|
+ r.totalcount,
|
|
|
|
|
+ r.totalfee,
|
|
|
|
|
+ r.divideamount,
|
|
|
|
|
+ r.accountcurrencyid,
|
|
|
|
|
+ u.userid || '/' || u.accountname as areaname
|
|
|
|
|
+ from reckon_daydividecount r
|
|
|
|
|
+ left join useraccount u on r.areaid = u.userid
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="vo.tradedate != null and vo.tradedate != '' ">
|
|
|
|
|
+ and r.tradedate= #{vo.tradedate,jdbcType=CHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vo.areaid != null">
|
|
|
|
|
+ and r.areaid = #{vo.areaid}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vo.areaname != null and vo.areaname != ''">
|
|
|
|
|
+ and r.areaid = #{vo.areaname}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vo.areatype != null and vo.areatype !=''">
|
|
|
|
|
+ and r.areatype in (${vo.areatype})
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vo.usertype != null">
|
|
|
|
|
+ and u.usertype in (${vo.usertype})
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vo.parentuserid != null or vo.parentuserid==1">
|
|
|
|
|
+ and (r.areaid = #{vo.parentuserid} or u.usertype=2 )
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vo.parentareaid != null">
|
|
|
|
|
+ and r.areaid in (select userid from useraccount uo start with
|
|
|
|
|
+ uo.userid=${vo.parentareaid} connect by prior uo.userid
|
|
|
|
|
+ =uo.parentuserid and uo.usertype=3)
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vo.yxareauserid !=null and vo.yxareauserid != ''">
|
|
|
|
|
+ and (u.userid = #{vo.yxareauserid} or u.userid in (select userid from useraccount t
|
|
|
|
|
+ where t.usertype in (2,3) and t.memberuserid in (select userid from useraccount t where t.usertype = 2 and t.parentuserid = #{vo.yxareauserid})))
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ order by r.areaid,r.areatype,r.areaaccountid
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <select id="queryByOther" resultType="com.muchinfo.mtp3pojos.vo.reportform.ShareAmountQueryResult">
|
|
|
|
|
+ select
|
|
|
|
|
+ r.cycletype,r.cycletime,r.areaid,r.areatype,
|
|
|
|
|
+ r.areaaccountid,r.totalcount,r.totalfee,
|
|
|
|
|
+ r.divideamount,
|
|
|
|
|
+ u.userid || '/' || u.accountname as areaname
|
|
|
|
|
+ from report_dividecount r
|
|
|
|
|
+ left join useraccount u on r.areaid = u.userid
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="vo.cycletype !=null and vo.cycletype != ''">
|
|
|
|
|
+ and r.cycletype=#{vo.cycletype}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vo.tradedate !=null and vo.tradedate != '' and vo.cycletype != 4">
|
|
|
|
|
+ and r.cycletime = #{vo.tradedate}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vo.tradedate !=null and vo.tradedate != '' and vo.cycletype == 4">
|
|
|
|
|
+ and r.cycletime= (select to_char(trunc(to_date(#{vo.tradedate},
|
|
|
|
|
+ 'YYYYMMDD'),'iw')+3,'yyyy') || to_char(to_date(#{vo.tradedate},
|
|
|
|
|
+ 'YYYYMMDD'), 'iw') from dual)
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vo.areaname != null and vo.areaname !=''">
|
|
|
|
|
+ and r.areaid = #{vo.areaname}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vo.usertype != null and vo.usertype !=''">
|
|
|
|
|
+ and u.usertype in (${vo.usertype})
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vo.areatype != null and vo.areatype !=''">
|
|
|
|
|
+ and r.areatype in (${vo.areatype})
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vo.parentuserid != null or vo.parentuserid==1">
|
|
|
|
|
+ <choose>
|
|
|
|
|
+ <when test="vo.parentuserid==1">
|
|
|
|
|
+ and (r.areaid = 1 or u.usertype=2 )
|
|
|
|
|
+ </when>
|
|
|
|
|
+ <otherwise>
|
|
|
|
|
+ and (r.areaid = #{vo.parentuserid} or u.parentuserid=#{vo.parentuserid} )
|
|
|
|
|
+ </otherwise>
|
|
|
|
|
+ </choose>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vo.yxareauserid !=null and vo.yxareauserid != ''">
|
|
|
|
|
+ and (u.userid = #{vo.yxareauserid} or u.userid in (select userid from useraccount t
|
|
|
|
|
+ where t.usertype in (2,3) and t.memberuserid in (select userid from useraccount t where t.usertype = 2 and t.parentuserid = #{vo.yxareauserid})))
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ order by r.areaid,r.areatype,r.areaaccountid
|
|
|
|
|
+ </select>
|
|
|
</mapper>
|
|
</mapper>
|