|
@@ -1,7 +1,7 @@
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.fuzamei.mapperInterface.CapitalTransferMapper"><!-- 找接口 -->
|
|
|
- <!--查询资金划转表 列表 省分行托管中心指令业务岗 -->
|
|
|
+ <!--查询资金划转表 列表 管理人发起后 管理人和指令业务岗能看见 -->
|
|
|
<select id="selectCapitalTransferTable" parameterType="java.util.Map" resultType="com.fuzamei.entity.CapitalTransfer">
|
|
|
select z.fund_id,
|
|
|
y.person_name,
|
|
@@ -34,11 +34,101 @@
|
|
|
order by apply_time desc
|
|
|
limit #{startPage},#{rowNum}
|
|
|
</select>
|
|
|
- <!--查询资金划转表 返回查询总条数 -->
|
|
|
+ <!-- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||/////////////////////////////-->
|
|
|
+ <!--查询资金划转表 列表 指令业务岗审核通过后 核算业务岗 才能看见之前的记录 状态不在12和13 -->
|
|
|
+ <select id="selectCapitalTransferTable2" parameterType="java.util.Map" resultType="com.fuzamei.entity.CapitalTransfer">
|
|
|
+ select z.fund_id,
|
|
|
+ y.person_name,
|
|
|
+ z.fund_name,
|
|
|
+ y.account_balance,
|
|
|
+ z.sum_of_money,
|
|
|
+ f.attachment_name,
|
|
|
+ f.url,
|
|
|
+ y.drawing_account,
|
|
|
+ z.apply_time,
|
|
|
+ z.handle_time,
|
|
|
+ s.status_name
|
|
|
+ from
|
|
|
+ capital_transfer z left join t_user y
|
|
|
+ on z. custodian=y.user_id
|
|
|
+ left join attachment f
|
|
|
+ on z.basis_of_payment=f.attachment_id
|
|
|
+ left join status s on z.status_id=s.status_id
|
|
|
+ <where>
|
|
|
+ z.status_id not in(12,13)
|
|
|
+ <if test="fund_name!='' and fund_name!= null">
|
|
|
+ and fund_name=#{fund_name}
|
|
|
+ </if>
|
|
|
+ <if test="status_name!='' and status_name!=null">
|
|
|
+ and status_name=#{status_name}
|
|
|
+ </if>
|
|
|
+ <if test="startTime!=null and endTime!=null">
|
|
|
+ and apply_time between #{startTime} and #{endTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ order by apply_time desc
|
|
|
+ limit #{startPage},#{rowNum}
|
|
|
+ </select>
|
|
|
+ <!--/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
|
|
|
+ <!--查询资金划转表 列表 指令业务岗和核算业务岗审核通过后 核算主管岗 才能看见之前的记录 状态不在12和13和14和15 -->
|
|
|
+ <select id="selectCapitalTransferTable3" parameterType="java.util.Map" resultType="com.fuzamei.entity.CapitalTransfer">
|
|
|
+ select z.fund_id,
|
|
|
+ y.person_name,
|
|
|
+ z.fund_name,
|
|
|
+ y.account_balance,
|
|
|
+ z.sum_of_money,
|
|
|
+ f.attachment_name,
|
|
|
+ f.url,
|
|
|
+ y.drawing_account,
|
|
|
+ z.apply_time,
|
|
|
+ z.handle_time,
|
|
|
+ s.status_name
|
|
|
+ from
|
|
|
+ capital_transfer z left join t_user y
|
|
|
+ on z. custodian=y.user_id
|
|
|
+ left join attachment f
|
|
|
+ on z.basis_of_payment=f.attachment_id
|
|
|
+ left join status s on z.status_id=s.status_id
|
|
|
+ <where>
|
|
|
+ z.status_id not in(12,13,14,15)
|
|
|
+ <if test="fund_name!='' and fund_name!= null">
|
|
|
+ and fund_name=#{fund_name}
|
|
|
+ </if>
|
|
|
+ <if test="status_name!='' and status_name!=null">
|
|
|
+ and status_name=#{status_name}
|
|
|
+ </if>
|
|
|
+ <if test="startTime!=null and endTime!=null">
|
|
|
+ and apply_time between #{startTime} and #{endTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ order by apply_time desc
|
|
|
+ limit #{startPage},#{rowNum}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- ///////////////////////////////分页//////////////////////////////////////////////////////////////////////////////////// -->
|
|
|
+ <!--查询资金划转表 返回查询总条数 管理人和指令业务岗可以查看-->
|
|
|
<select id="selectCapitalTransferPage" resultType="int" parameterType="java.util.Map">
|
|
|
- select count(*) from capital_transfer z left join status s on z.status_id = s.status_id
|
|
|
+ <!-- SELECT count(*) from capital_transfer z left join status s on z.status_id = s.status_id -->
|
|
|
+ select count(*) from capital_transfer z
|
|
|
+ <where>
|
|
|
+ <if test="fund_name != null and fund_name!=''">
|
|
|
+ fund_name=#{fund_name}
|
|
|
+ </if>
|
|
|
+ <if test="status_name!= null and status_name!=''">
|
|
|
+ and status_name=#{status_name}
|
|
|
+ </if>
|
|
|
+ <if test="startTime!=null and endTime!=null">
|
|
|
+ and apply_time between #{startTime} and #{endTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+ <!-- ////////////////////////////////////////////////////////////////////////////////////////////////// -->
|
|
|
+ <!--查询资金划转表 返回查询总条数 指令业务岗审核通过后核算业务岗才能看见之前审核的列表信息 -->
|
|
|
+ <select id="selectCapitalTransferPage2" resultType="int" parameterType="java.util.Map">
|
|
|
+ <!-- SELECT count(*) from capital_transfer z left join status s on z.status_id = s.status_id -->
|
|
|
+ select count(*) from capital_transfer z
|
|
|
<where>
|
|
|
-
|
|
|
+ z.status_id not in(12,13)
|
|
|
<if test="fund_name != null and fund_name!=''">
|
|
|
and fund_name=#{fund_name}
|
|
|
</if>
|
|
@@ -51,18 +141,44 @@
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
+<!--///////////////////////////////////////////////////////////////// -->
|
|
|
+ <!--查询资金划转表 返回查询总条数 指令业务岗和核算业务岗审核通过后核算主管岗才能看见之前的2级审核的列表的信息 -->
|
|
|
+ <select id="selectCapitalTransferPage3" resultType="int" parameterType="java.util.Map">
|
|
|
+ <!-- SELECT count(*) from capital_transfer z left join status s on z.status_id = s.status_id -->
|
|
|
+ select count(*) from capital_transfer z
|
|
|
+ <where>
|
|
|
+ z.status_id not in(12,13,14,15)
|
|
|
+ <if test="fund_name!= null and fund_name!=''">
|
|
|
+ and fund_name=#{fund_name}
|
|
|
+ </if>
|
|
|
+ <if test="status_name!= null and status_name!=''">
|
|
|
+ and status_name=#{status_name}
|
|
|
+ </if>
|
|
|
+ <if test="startTime!=null and endTime!=null">
|
|
|
+ and apply_time between #{startTime} and #{endTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<!--************************************************************************************************ -->
|
|
|
<!--查看 资金划转详情 根据前端给我返回的id 在把那一条数据查出来-->
|
|
|
<select id="selectChaKanZiJinHuaZhuan" parameterType="java.util.Map" resultType="com.fuzamei.entity.CapitalTransfer">
|
|
|
select y.person_name,
|
|
|
- sj.fund_name,
|
|
|
- y.account_balance,
|
|
|
- sj.sum_of_money,
|
|
|
- f.attachment_name,
|
|
|
- f.url,
|
|
|
- y.drawing_account,
|
|
|
- sj.apply_time
|
|
|
- from capital_transfer sj left join t_user y on sj.custodian= y.user_id left join attachment f on sj.basis_of_payment=f.attachment_id
|
|
|
+ sj.fund_name,
|
|
|
+ y.account_balance,
|
|
|
+ sj.sum_of_money,
|
|
|
+ f.attachment_name,
|
|
|
+ f.url,
|
|
|
+ y.drawing_account,
|
|
|
+ sj.apply_time
|
|
|
+ from capital_transfer sj
|
|
|
+ left join
|
|
|
+ t_user y
|
|
|
+ on sj.custodian= y.user_id
|
|
|
+ left join attachment f
|
|
|
+ on sj.basis_of_payment=f.attachment_id
|
|
|
<where>
|
|
|
<if test="fund_id!='' and fund_id!=null">
|
|
|
fund_id=#{fund_id}
|
|
@@ -88,15 +204,23 @@
|
|
|
s.status_name as check_result,
|
|
|
sj.relation
|
|
|
from
|
|
|
- capital_transfer_check sj
|
|
|
- left join status s on sj.check_result =s.status_id )sj
|
|
|
- left join status s on s.status_id=sj.relation
|
|
|
+ capital_transfer_check sj
|
|
|
+ left join
|
|
|
+ status s on sj.check_result =s.status_id )sj
|
|
|
+ left join
|
|
|
+ status s on s.status_id=sj.relation
|
|
|
<where>
|
|
|
<if test="fund_id!='' and fund_id!=null">
|
|
|
fund_id=#{fund_id}
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
+ <!--//////////////////// -->
|
|
|
+ <!-- 根据资金划转id查询状态id值 -->
|
|
|
+ <select id="getStatusIdByCapitalId" resultType="int">
|
|
|
+ select status_id from capital_transfer where fund_id=#{fund_id}
|
|
|
+ </select>
|
|
|
+ <!--===========================================以下=================================================================================== -->
|
|
|
<!-- 管理人 发起 划转资金 插入到划转资金表*******************************///暂没用////////////////////////////////////////////////////// -->
|
|
|
<insert id="insertCapitalTransfer">
|
|
|
insert into
|
|
@@ -117,8 +241,8 @@
|
|
|
#{handle_time},
|
|
|
#{status_id})
|
|
|
</insert>
|
|
|
-
|
|
|
- <!--****************************************************************************************************************************** -->
|
|
|
+
|
|
|
+ <!--******************************************//**////***///************************************************************************************ -->
|
|
|
<!-- 将划转资金 上传 附件信息插入附件表中 -->
|
|
|
<insert id="insertAttachmentInfo">
|
|
|
insert into
|
|
@@ -151,7 +275,7 @@
|
|
|
#{hash})
|
|
|
</insert>
|
|
|
<!--******************************************************************************************************* -->
|
|
|
- <!-- 查询划转资金表 几级审核 审核意见 --><!-- 要排除状态13 状态为:指令业务岗审核不通过。 指令业务岗审核不通过就到不了核算业务岗这里审核 -->
|
|
|
+ <!-- 查询划转资金表 几级审核 审核意见 --><!-- 要排除状态13 状态为: 指令业务岗审核不通过就到不了核算业务岗这里审核 -->
|
|
|
<select id="selectCheckOpinion" parameterType="java.util.Map" resultType="com.fuzamei.entity.CapitalTransfer">
|
|
|
select
|
|
|
y.person_name,
|
|
@@ -199,13 +323,19 @@
|
|
|
s.check_person,
|
|
|
s.check_opinion,
|
|
|
s.check_time,
|
|
|
- y.status_name
|
|
|
- from capital_transfer_check s
|
|
|
- left join status y on s.check_result=y.status_id
|
|
|
+ y.status_name as check_result,
|
|
|
+ zt.status_name as relation
|
|
|
+ from
|
|
|
+ capital_transfer_check s
|
|
|
+ left join
|
|
|
+ status y on s.check_result=y.status_id
|
|
|
+ left join
|
|
|
+ status zt on s.relation=zt.status_id
|
|
|
+
|
|
|
|
|
|
</select>
|
|
|
<!-- 将划转审核结果意见在插入划转资金表的同时,也将审核结果更新到划转资金表中去,根据基金id ->fund_id定位到指定的业务 -->
|
|
|
- <update id="updatecapitaltransferStatus" parameterType="java.util.Map">
|
|
|
+ <update id="updateCapitaltransferStatus" parameterType="java.util.Map">
|
|
|
update
|
|
|
capital_transfer
|
|
|
set
|