|
@@ -12,10 +12,11 @@
|
|
<association property="bizArchiveInput" column="contract_id" select="getArchiveInput" javaType="cn.ezhizao.project.business.collection.domain.vo.ArchiveVo" />
|
|
<association property="bizArchiveInput" column="contract_id" select="getArchiveInput" javaType="cn.ezhizao.project.business.collection.domain.vo.ArchiveVo" />
|
|
</resultMap>
|
|
</resultMap>
|
|
<select id="getCollection" resultType="cn.ezhizao.project.business.collection.domain.BizCollection">
|
|
<select id="getCollection" resultType="cn.ezhizao.project.business.collection.domain.BizCollection">
|
|
- select *,user1.nick_name as applierName,user2.nick_name as verifyName from biz_collection
|
|
|
|
|
|
+ select *,user1.nick_name as applierName,user2.nick_name as verifyName,com.name as companyName from biz_collection
|
|
left join sys_user user1 on user1.user_id = biz_collection.applier_id
|
|
left join sys_user user1 on user1.user_id = biz_collection.applier_id
|
|
left join sys_user user2 on user2.user_id = biz_collection.verify_id
|
|
left join sys_user user2 on user2.user_id = biz_collection.verify_id
|
|
- where id = #{collection_id}
|
|
|
|
|
|
+ left join biz_company com on com.id = biz_collection.company_id
|
|
|
|
+ where biz_collection.id = #{collection_id}
|
|
</select>
|
|
</select>
|
|
<select id="getArchiveInput" resultType="cn.ezhizao.project.business.collection.domain.vo.ArchiveVo">
|
|
<select id="getArchiveInput" resultType="cn.ezhizao.project.business.collection.domain.vo.ArchiveVo">
|
|
select * from biz_archive_input where id = #{contract_id}
|
|
select * from biz_archive_input where id = #{contract_id}
|
|
@@ -128,7 +129,9 @@
|
|
</if>
|
|
</if>
|
|
</delete>
|
|
</delete>
|
|
<select id="getDetailList" resultMap="DetailResultMap">
|
|
<select id="getDetailList" resultMap="DetailResultMap">
|
|
- select detail.*,(select sum(cd.arrive_amount) from biz_collection_detail cd left join biz_collection c on c.id =
|
|
|
|
|
|
+ select detail.*,company.name as cname,
|
|
|
|
+ (select sum(cd.arrive_amount) from biz_collection_detail cd
|
|
|
|
+ left join biz_collection c on c.id =
|
|
cd.collection_id
|
|
cd.collection_id
|
|
where cd.contract_detail_id = detail.contract_detail_id
|
|
where cd.contract_detail_id = detail.contract_detail_id
|
|
and cd.deleted = 0 and detail.contract_id = cd.contract_id and c.status = 1) arrived from biz_collection_detail
|
|
and cd.deleted = 0 and detail.contract_id = cd.contract_id and c.status = 1) arrived from biz_collection_detail
|