|
@@ -363,4 +363,18 @@ store.`spare_id`=info.`id`
|
|
|
WHERE info.`parent_id`=#{typeId}
|
|
|
and store.store_id=#{storeId}
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="getByCondition" parameterType="com.platform.dao.dto.sqarepartmanage.SparePartInfoDTO"
|
|
|
+ resultType="com.platform.dao.vo.query.sparepartmanage.SparePartInfoVO">
|
|
|
+ select info.*,sum(spareStore.num) as totalNum from t_spare_part_info info left join t_spare_store spareStore on spareStore.spare_id = info.id
|
|
|
+ <where>
|
|
|
+ <if test="storeId!=null and storeId!=''">
|
|
|
+ and spareStore.store_id=#{storeId}
|
|
|
+ </if>
|
|
|
+ <if test="typeId!=null and typeId!=''">
|
|
|
+ and info.type_id=#{typeId}
|
|
|
+ </if>
|
|
|
+ group by info.id
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
</mapper>
|