|
|
|
@ -20,24 +20,29 @@ |
|
|
|
a.userName, |
|
|
|
a.transType, |
|
|
|
d.part_desc, |
|
|
|
c.itemNo |
|
|
|
c.itemNo, |
|
|
|
(SELECT COUNT(*) |
|
|
|
FROM TransDetailsub |
|
|
|
WHERE transNo = a.transNo AND itemNo = c.itemNo) AS num |
|
|
|
FROM |
|
|
|
TransHeader AS a |
|
|
|
LEFT JOIN TransDetail AS c ON a.Site = c.Site |
|
|
|
AND a.TransNo = c.TransNo |
|
|
|
LEFT JOIN part AS d ON d.part_no = c.partNo |
|
|
|
<if test = "list.partNo != null and list.partNo != ''"> |
|
|
|
AND c.partNo = #{list.partNo} |
|
|
|
</if> |
|
|
|
<if test = "list.locationID != null and list.locationID != ''"> |
|
|
|
AND c.locationID = #{list.locationID} |
|
|
|
</if> |
|
|
|
<if test = "list.partDesc != null and list.partDesc != ''"> |
|
|
|
AND d.part_desc = #{list.partDesc} |
|
|
|
</if> |
|
|
|
<if test = "list.transType != null and list.transType != ''"> |
|
|
|
AND a.transType = #{list.transType} |
|
|
|
</if> |
|
|
|
<where> |
|
|
|
<if test = "list.partNo != null and list.partNo != ''"> |
|
|
|
AND c.partNo = #{list.partNo} |
|
|
|
</if> |
|
|
|
<if test = "list.locationID != null and list.locationID != ''"> |
|
|
|
AND c.locationID = #{list.locationID} |
|
|
|
</if> |
|
|
|
<if test = "list.partDesc != null and list.partDesc != ''"> |
|
|
|
AND d.part_desc = #{list.partDesc} |
|
|
|
</if> |
|
|
|
<if test = "list.transType != null and list.transType != ''"> |
|
|
|
AND a.transType = #{list.transType} |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="fingByRollNo" resultType="com.spring.modules.material.entity.TransDetailsub"> |
|
|
|
@ -64,23 +69,28 @@ |
|
|
|
a.transNo, |
|
|
|
d.part_desc, |
|
|
|
c.itemNo, |
|
|
|
c.expiredDate |
|
|
|
c.expiredDate, |
|
|
|
(SELECT COUNT(*) |
|
|
|
FROM TransDetailsub |
|
|
|
WHERE transNo = a.transNo AND itemNo = c.itemNo) AS num |
|
|
|
FROM |
|
|
|
TransHeader AS a |
|
|
|
INNER JOIN TransDetail AS c ON a.Site = c.Site |
|
|
|
AND a.TransNo = c.TransNo |
|
|
|
INNER JOIN part AS d ON d.part_no = c.partNo |
|
|
|
<if test = "list.partNo != null and list.partNo != ''"> |
|
|
|
AND c.partNo = #{list.partNo} |
|
|
|
</if> |
|
|
|
<if test = "list.locationID != null and list.locationID != ''"> |
|
|
|
AND c.locationID = #{list.locationID} |
|
|
|
</if> |
|
|
|
<if test = "list.partDesc != null and list.partDesc != ''"> |
|
|
|
AND d.part_desc = #{list.partDesc} |
|
|
|
</if> |
|
|
|
<where> |
|
|
|
<if test = "list.partNo != null and list.partNo != ''"> |
|
|
|
AND c.partNo = #{list.partNo} |
|
|
|
</if> |
|
|
|
<if test = "list.locationID != null and list.locationID != ''"> |
|
|
|
AND c.locationID = #{list.locationID} |
|
|
|
</if> |
|
|
|
<if test = "list.partDesc != null and list.partDesc != ''"> |
|
|
|
AND d.part_desc = #{list.partDesc} |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
<select id="sendByTime" resultType="com.spring.modules.material.entity.TransDetail"> |
|
|
|
select trans_no ,expiredDate where TransDetail |
|
|
|
select trans_no ,expiredDate from TransDetail |
|
|
|
</select> |
|
|
|
</mapper> |