|
|
|
@ -351,7 +351,7 @@ |
|
|
|
trd.ware_house_id, |
|
|
|
trd.location_id, |
|
|
|
trd.supplier_id, |
|
|
|
s.ResourceDesc as supplierName, |
|
|
|
dbo.Get_WorkCenterResourceDesc(td.site,trd.supplier_id) as supplierName, |
|
|
|
trd.remark, |
|
|
|
trd.created_by, |
|
|
|
trd.created_date, |
|
|
|
@ -359,7 +359,6 @@ |
|
|
|
trd.est_use_qty |
|
|
|
FROM tool_trans_detail as trd |
|
|
|
LEFT JOIN ToolDetail as td on trd.tool_instance_id = td.ToolInstanceID |
|
|
|
LEFT JOIN WorkCenterResource as s on s.ResourceID = trd.supplier_id |
|
|
|
<where> |
|
|
|
trd.delflag = 'N' |
|
|
|
<choose> |
|
|
|
@ -432,4 +431,49 @@ |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
<!-- 获取工具实例入库操作记录 --> |
|
|
|
<select id="queryToolWarehousingRecord" resultType="com.jtem.modules.pda.query.ToolTransDetailQuery" parameterType="com.jtem.modules.pda.query.ToolTransDetailQuery"> |
|
|
|
SELECT |
|
|
|
trd.trans_no, |
|
|
|
trd.tool_instance_id, |
|
|
|
trd.trans_qty, |
|
|
|
trd.ware_house_id, |
|
|
|
trd.location_id, |
|
|
|
trd.supplier_id, |
|
|
|
s.SupplierName, |
|
|
|
trd.remark, |
|
|
|
trd.created_by, |
|
|
|
trd.created_date, |
|
|
|
trd.trans_price, |
|
|
|
trd.est_use_qty |
|
|
|
FROM tool_trans_detail as trd |
|
|
|
LEFT JOIN ToolDetail as td on trd.tool_instance_id = td.ToolInstanceID |
|
|
|
LEFT JOIN Supplier as s on s.supplierID = trd.supplier_id |
|
|
|
<where> |
|
|
|
trd.delflag = 'N' |
|
|
|
<choose> |
|
|
|
<when test="query.typeFlag.length() == 2"> |
|
|
|
AND (trd.trans_no like #{query.typeFlag} + '[^F]%' or trd.trans_no like 'CR' + '[^F]%') |
|
|
|
</when> |
|
|
|
<otherwise> |
|
|
|
and trd.trans_no like #{query.typeFlag} + '%' |
|
|
|
</otherwise> |
|
|
|
</choose> |
|
|
|
<if test = "query.toolId != null and query.toolId != ''"> |
|
|
|
AND td.tool_id LIKE '%' + #{query.toolId}+'%' |
|
|
|
</if> |
|
|
|
<if test = "query.toolInstanceId != null and query.toolInstanceId != ''"> |
|
|
|
AND trd.tool_instance_id LIKE '%' + #{query.toolInstanceId}+'%' |
|
|
|
</if> |
|
|
|
<if test = "query.locationId != null and query.locationId != ''"> |
|
|
|
AND trd.location_id LIKE '%' + #{query.locationId}+'%' |
|
|
|
</if> |
|
|
|
<if test="query.startDate != null"> |
|
|
|
AND trd.created_date >= #{query.startDate} |
|
|
|
</if> |
|
|
|
<if test="query.endDate != null"> |
|
|
|
AND #{query.endDate} >= trd.created_date |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
</mapper> |