|
@@ -148,7 +148,7 @@
|
|
|
|
|
|
<select id="getInAndOutNum" parameterType="com.platform.dao.dto.store.InStoreFormDTO"
|
|
|
resultType="com.platform.dao.vo.report.InAndOutStoretReportVO">
|
|
|
- SELECT info.name ,t1.inNum,t2.outNum
|
|
|
+ SELECT info.name as spareName ,t1.inNum,t2.outNum
|
|
|
FROM t_spare_part_info info
|
|
|
LEFT JOIN (SELECT info.id spare_id,SUM(inform.in_num) inNum FROM t_spare_part_info info LEFT JOIN t_in_store_form inform ON info.id=inform.spare_id
|
|
|
<where>
|
|
@@ -156,11 +156,9 @@
|
|
|
and inform.created_time <![CDATA[>=]]> #{searchTimeStart}
|
|
|
</if>
|
|
|
<if test="searchTimeEnd!=null and searchTimeEnd!=null">
|
|
|
- and inform.created_time <![CDATA[>=]]> #{searchTimeEnd}
|
|
|
- </if>
|
|
|
- <if test="spareName!=null and spareName@=''">
|
|
|
- and info.name like concat('%',#{spareName},'%')
|
|
|
+ and inform.created_time <![CDATA[<=]]> #{searchTimeEnd}
|
|
|
</if>
|
|
|
+
|
|
|
</where>
|
|
|
GROUP BY info.id) AS t1
|
|
|
ON info.id=t1.spare_id
|
|
@@ -171,15 +169,16 @@
|
|
|
and outform.created_time <![CDATA[>=]]> #{searchTimeStart}
|
|
|
</if>
|
|
|
<if test="searchTimeEnd!=null and searchTimeEnd!=null">
|
|
|
- and outform.created_time <![CDATA[>=]]> #{searchTimeEnd}
|
|
|
- </if>
|
|
|
- <if test="spareName!=null and spareName@=''">
|
|
|
- and info.name like concat('%',#{spareName},'%')
|
|
|
+ and outform.created_time <![CDATA[<=]]> #{searchTimeEnd}
|
|
|
</if>
|
|
|
</where>
|
|
|
GROUP BY info.id) AS t2
|
|
|
ON info.id=t2.spare_id
|
|
|
-
|
|
|
+ <where>
|
|
|
+ <if test="spareName!=null and spareName!=''">
|
|
|
+ and info.name like concat('%',#{spareName},'%')
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
</select>
|
|
|
|
|
|
|