|
@@ -117,6 +117,7 @@
|
|
|
and outstoreform.created_time <![CDATA[<=]]> #{searchTimeEnd}
|
|
|
</if>
|
|
|
</where>
|
|
|
+ group by outstoreform.spare_id
|
|
|
</select>
|
|
|
|
|
|
<select id="selectDetailList" resultType="com.platform.dao.vo.query.store.OutStoreDetailVO">
|
|
@@ -150,13 +151,13 @@
|
|
|
|
|
|
<select id="getOutStoreSpareNum" parameterType="com.platform.dao.dto.store.OutStoreFormDTO"
|
|
|
resultType="com.platform.dao.vo.export.store.ExportOutStoreSpareNumVO">
|
|
|
- SELECT info.name as spareName, SUM(in_num) inNum FROM t_out_store_form form LEFT JOIN t_spare_part_info info ON info.id=form.spare_id
|
|
|
+ SELECT info.name as spareName,info.id as spareId, if(SUM(out_num) is null,0,out_num) outNum FROM t_out_store_form form right JOIN t_spare_part_info info ON info.id=form.spare_id
|
|
|
<where>
|
|
|
<if test="searchTimeStart!=null">
|
|
|
- and inform.created_time <![CDATA[>=]]> #{searchTimeStart}
|
|
|
+ and form.created_time <![CDATA[>=]]> #{searchTimeStart}
|
|
|
</if>
|
|
|
<if test="searchTimeEnd!=null">
|
|
|
- and inform.created_time <![CDATA[<=]]> #{searchTimeEnd}
|
|
|
+ and form.created_time <![CDATA[<=]]> #{searchTimeEnd}
|
|
|
</if>
|
|
|
</where>
|
|
|
GROUP BY spare_id
|