|
|
@@ -880,7 +880,7 @@
|
|
|
</select>
|
|
|
<!-- 采购明细报表明细 -->
|
|
|
<select id="getPurDetailReport" resultType="java.util.Map">
|
|
|
- select
|
|
|
+ select distinct
|
|
|
tpp.pur_id as "purId"
|
|
|
,tpp.pur_no as "purNo"
|
|
|
,tmo.org_name as "orgName"
|
|
|
@@ -902,7 +902,7 @@
|
|
|
,tpp.amt_residue as "amtResidue"
|
|
|
,tpp.remarks
|
|
|
,tpo.order_no as "orderNo"
|
|
|
- ,ib.into_no as "intoNo"
|
|
|
+ ,tpp.make_time as "makeTime"
|
|
|
,tmgs.sku_name as "skuName"
|
|
|
,tmgs.sku_model as "skuModel"
|
|
|
,tmgs.sku_spec as "skuSpec"
|
|
|
@@ -938,13 +938,12 @@
|
|
|
left join dkic_b.t_mst_goods_category as tmgc on tmgc.cat_id = tmgs.category_id
|
|
|
left join dkic_b.t_mst_goods_series as series on series.series_id = tmgs.series_id
|
|
|
left join dkic_b.t_psi_order as tpo on tpo.order_id = tppi.from_id
|
|
|
- left join dkic_b.t_psi_inbound_item as ibi on ibi.from_item_id=tppi.item_id
|
|
|
- left join dkic_b.t_psi_inbound as ib on ibi.into_id=ib.into_id
|
|
|
+
|
|
|
left join sys.t_data_kind tdk3 on tdk3.kind_code = tppi.into_status
|
|
|
left join dkic_b.t_mst_unit as tmgu on tmgs.unit_id = tmgu.unit_id
|
|
|
left join dkic_b.t_mst_unit as tmgus on tmgs.sub_unit_id = tmgus.unit_id
|
|
|
<include refid="Condition_PurDetailReport"/>
|
|
|
- order by tpp.op_create_time desc
|
|
|
+ order by tpp.make_time desc
|
|
|
<if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
limit #{end} offset #{start}
|
|
|
</if>
|
|
|
@@ -966,8 +965,6 @@
|
|
|
left join dkic_b.t_mst_goods_category as tmgc on tmgc.cat_id = tmgs.category_id
|
|
|
left join dkic_b.t_mst_goods_series as series on series.series_id = tmgs.series_id
|
|
|
left join dkic_b.t_psi_order as tpo on tpo.order_id = tppi.from_id
|
|
|
- left join dkic_b.t_psi_inbound_item as ibi on ibi.from_item_id=tppi.item_id
|
|
|
- left join dkic_b.t_psi_inbound as ib on ibi.into_id=ib.into_id
|
|
|
left join sys.t_data_kind tdk3 on tdk3.kind_code = tppi.into_status
|
|
|
<include refid="Condition_PurDetailReport"/>
|
|
|
</select>
|