|
@@ -279,16 +279,16 @@
|
|
|
|
|
|
<select id="getOutStoreFormCollect" resultType="com.platform.dao.vo.query.store.OutStoreFormVO"
|
|
<select id="getOutStoreFormCollect" resultType="com.platform.dao.vo.query.store.OutStoreFormVO"
|
|
parameterType="com.platform.dao.dto.store.OutStoreFormDTO">
|
|
parameterType="com.platform.dao.dto.store.OutStoreFormDTO">
|
|
- select info.*,sum(form.out_num ) totalNum,sum(form.out_num )*info.initial_value as totalPrice,form.id outId,form.out_no outNo,store.id storeId,spareStore.spare_id spareId from t_spare_part_info info
|
|
|
|
- right join t_out_store_form form on info.id = form.spare_id
|
|
|
|
|
|
+ select info.*,sum(form.out_num ) totalNum,sum(form.out_num )*info.initial_value as totalPrice,form.id outId,
|
|
|
|
+ form.out_no outNo,store.id storeId,spareStore.spare_id spareId,
|
|
|
|
+ spareType.name as typeName,sum(spareStore.num) currentStock,producer.name as producerName
|
|
|
|
+
|
|
|
|
+ from t_spare_part_info info
|
|
|
|
+ inner join t_out_store_form form on info.id = form.spare_id
|
|
left join t_spare_store spareStore on spareStore.spare_id = info.id
|
|
left join t_spare_store spareStore on spareStore.spare_id = info.id
|
|
left join t_store store on store.id = spareStore.store_id
|
|
left join t_store store on store.id = spareStore.store_id
|
|
- <if test="producerName != null and producerName != ''">
|
|
|
|
- LEFT JOIN t_firm_producer producer on producer.id = info.producer_id
|
|
|
|
- </if>
|
|
|
|
- <if test="supplierName != null and supplierName != ''">
|
|
|
|
- LEFT JOIN t_supplier supplier on supplier.id = info.supplier_id
|
|
|
|
- </if>
|
|
|
|
|
|
+ left join t_spare_type spareType on spareType.id = info.type_id
|
|
|
|
+ left join t_firm_producer producer on producer.id = info.producer_id
|
|
<where>
|
|
<where>
|
|
<if test="storeId!=null and storeId!=''">
|
|
<if test="storeId!=null and storeId!=''">
|
|
store.id = #{storeId}
|
|
store.id = #{storeId}
|