|
|
@ -86,6 +86,7 @@ |
|
|
<if test="did != null and did != ''"> |
|
|
<if test="did != null and did != ''"> |
|
|
and ( p.did = #{did} or p.did = 0) |
|
|
and ( p.did = #{did} or p.did = 0) |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
and p.state != 3 |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<select id="findPlaceByDidAndCode" resultMap="placeMap" parameterType="map"> |
|
|
<select id="findPlaceByDidAndCode" resultMap="placeMap" parameterType="map"> |
|
|
@ -98,6 +99,7 @@ |
|
|
<if test="did != '' and did != null"> |
|
|
<if test="did != '' and did != null"> |
|
|
and p.did = #{did} |
|
|
and p.did = #{did} |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
and p.state != 3 |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<select id="findPlaceAndMaterialByDidAndMid" resultMap="MaterialAndPlaceForViewMap" parameterType="map"> |
|
|
<select id="findPlaceAndMaterialByDidAndMid" resultMap="MaterialAndPlaceForViewMap" parameterType="map"> |
|
|
@ -110,6 +112,7 @@ |
|
|
<if test="depositoryId != null and depositoryId != ''"> |
|
|
<if test="depositoryId != null and depositoryId != ''"> |
|
|
and depository_id = #{depositoryId} |
|
|
and depository_id = #{depositoryId} |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
and pstate != 3 |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<!-- 根据条件参数查询列表 --> |
|
|
<!-- 根据条件参数查询列表 --> |
|
|
@ -193,14 +196,14 @@ |
|
|
<select id="findPlaceByDid" parameterType="int" resultMap="placeMap"> |
|
|
<select id="findPlaceByDid" parameterType="int" resultMap="placeMap"> |
|
|
SELECT |
|
|
SELECT |
|
|
<include refid="allColumns" /> |
|
|
<include refid="allColumns" /> |
|
|
FROM place p WHERE 1 = 1 and p.did = #{did} |
|
|
FROM place p WHERE 1 = 1 and p.did = #{did} and p.state != 3 |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="findPlaceByMid" parameterType="int" resultMap="placeMap"> |
|
|
<select id="findPlaceByMid" parameterType="int" resultMap="placeMap"> |
|
|
SELECT |
|
|
SELECT |
|
|
<include refid="allColumns" /> |
|
|
<include refid="allColumns" /> |
|
|
FROM materialandplace mp left join place p on p.id = mp.pid WHERE 1 = 1 and mp.mid = #{mid} |
|
|
FROM materialandplace mp left join place p on p.id = mp.pid WHERE 1 = 1 and mp.mid = #{mid} and p.state != 3 |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<select id="findQuantityByMidAndPid" parameterType="map" resultType="int"> |
|
|
<select id="findQuantityByMidAndPid" parameterType="map" resultType="int"> |
|
|
@ -219,7 +222,7 @@ |
|
|
<select id="findPlaceAndMaterialByPid" resultMap="materialAndPlaceMap" parameterType="int"> |
|
|
<select id="findPlaceAndMaterialByPid" resultMap="materialAndPlaceMap" parameterType="int"> |
|
|
SELECT |
|
|
SELECT |
|
|
<include refid="allColumnsByMaterialAndPlace" /> |
|
|
<include refid="allColumnsByMaterialAndPlace" /> |
|
|
FROM materialandplace mp left join place p on p.id = mp.pid WHERE 1 = 1 and p.id = #{id} |
|
|
FROM materialandplace mp left join place p on p.id = mp.pid WHERE 1 = 1 and p.id = #{id} and p.state != 3 |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -234,12 +237,13 @@ |
|
|
<if test="pid != null"> |
|
|
<if test="pid != null"> |
|
|
and mp.pid = #{pid} |
|
|
and mp.pid = #{pid} |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
and p.state != 3 |
|
|
</select> |
|
|
</select> |
|
|
<select id="findPlaceAndMaterialById" resultMap="materialAndPlaceMap" parameterType="int"> |
|
|
<select id="findPlaceAndMaterialById" resultMap="materialAndPlaceMap" parameterType="int"> |
|
|
SELECT |
|
|
SELECT |
|
|
<include refid="allColumnsByMaterialAndPlace" /> |
|
|
<include refid="allColumnsByMaterialAndPlace" /> |
|
|
FROM materialandplace mp left join place p on p.id = mp.pid |
|
|
FROM materialandplace mp left join place p on p.id = mp.pid |
|
|
where mp.id = #{id} |
|
|
where mp.id = #{id} and p.state != 3 |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -382,6 +386,7 @@ |
|
|
<if test="did != null and did != ''"> |
|
|
<if test="did != null and did != ''"> |
|
|
and did = #{did} |
|
|
and did = #{did} |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
|
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
</mapper> |
|
|
</mapper> |