瀏覽代碼

fix:收款明细出现问题

ly 10 月之前
父節點
當前提交
07e786aef6
共有 1 個文件被更改,包括 6 次插入3 次删除
  1. 6 3
      src/main/resources/mybatis/business/BizCollectionDetailMapper.xml

+ 6 - 3
src/main/resources/mybatis/business/BizCollectionDetailMapper.xml

@@ -12,10 +12,11 @@
         <association property="bizArchiveInput" column="contract_id" select="getArchiveInput" javaType="cn.ezhizao.project.business.collection.domain.vo.ArchiveVo" />
     </resultMap>
     <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 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 id="getArchiveInput" resultType="cn.ezhizao.project.business.collection.domain.vo.ArchiveVo">
         select * from biz_archive_input where id = #{contract_id}
@@ -128,7 +129,9 @@
         </if>
     </delete>
     <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
         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