|
@@ -262,7 +262,7 @@
|
|
|
|
|
|
<select id="getOutStoreSpareNum" parameterType="com.platform.dao.dto.store.OutStoreFormDTO"
|
|
|
resultType="com.platform.dao.vo.export.store.ExportOutStoreSpareNumVO">
|
|
|
- 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
|
|
|
+ SELECT info.name as spareName,info.id as spareId, SUM(if(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 form.created_time <![CDATA[>=]]> #{searchTimeStart}
|
|
@@ -271,7 +271,7 @@
|
|
|
and form.created_time <![CDATA[<=]]> #{searchTimeEnd}
|
|
|
</if>
|
|
|
</where>
|
|
|
- GROUP BY spare_id
|
|
|
+ group by info.id
|
|
|
</select>
|
|
|
|
|
|
<select id="getOutStoreFormCollect" resultType="com.platform.dao.vo.query.store.OutStoreFormVO"
|