|
@@ -4,12 +4,12 @@
|
4
|
4
|
<!-- 根据合同编号获取通知单数据列表 -->
|
5
|
5
|
<select id="findByHtbhCondition" resultType="com.chinaitop.depot.business.model.BusinessMergeNoticeDetail" parameterType="map">
|
6
|
6
|
SELECT
|
7
|
|
- a.org_id orgId,a.id tzdid, a.bill_number tzdbh, a.shiping_count jhsl, a.contract htbh, c.khmc khmc, b.grain_kind lspz, b.house_id ch, b.warehouse_id hwh
|
|
7
|
+ a.org_id orgId,a.id tzdid, a.bill_number tzdbh, a.shiping_count jhsl, b.htbh htbh, c.khmc khmc, b.grain_kind lspz, b.house_id ch, b.warehouse_id hwh
|
8
|
8
|
FROM business_delivery_storage_notice a
|
9
|
9
|
LEFT JOIN business_store_ware_detail b on b.zid=a.id AND b.type='notice'
|
10
|
|
- LEFT JOIN business_contract_receive c on c.htbh=a.contract
|
11
|
|
- WHERE 1=1 and a.audit_state=2 and a.in_Application in (1,3,4)
|
12
|
|
- AND a.contract = #{obj.htbh,jdbcType=VARCHAR}
|
|
10
|
+ LEFT JOIN business_contract_receive c on c.htbh=b.htbh
|
|
11
|
+ WHERE 1=1 and a.audit_state=2 and a.in_Application in (1,3,4) AND a.bill_type='3'
|
|
12
|
+ AND b.htbh = #{obj.htbh,jdbcType=VARCHAR}
|
13
|
13
|
AND a.org_id = #{obj.orgId,jdbcType=INTEGER}
|
14
|
14
|
ORDER BY a.create_time DESC
|
15
|
15
|
</select>
|