|
|
|
@ -117,13 +117,40 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getKuCunLabelData" resultType="InventoryStockOutData"> |
|
|
|
select a.site,a.bu_no,a.warehouse_id,location_id,roll_no,parent_roll_no,part_no,b.PartDescription,B.part_desc_en,a.status,a.qty_on_hand,label_type,a.orderref1,a.orderref2,a.orderref3,a.manufacture_date,a.expired_date,a.batch_no |
|
|
|
from inventory_stock a |
|
|
|
left join part b on a.site = b.site and a.bu_no = b.bu_no and a.part_no = b.PartNo |
|
|
|
select |
|
|
|
a.site, |
|
|
|
a.bu_no,--事业部 |
|
|
|
a.roll_no,--标签条码 |
|
|
|
a.qty_on_hand,--标签数量 |
|
|
|
a.status,--状态 |
|
|
|
a.part_no,--物料编码 |
|
|
|
b.PartDescription,--物料名称 |
|
|
|
b.Spec,--规格型号 |
|
|
|
b.UMID, |
|
|
|
UM.UMName,--单位名称 |
|
|
|
a.label_type,--标签类型 |
|
|
|
a.parent_roll_no, --上级标签号 |
|
|
|
a.parent_roll_type,--上级标签类型 |
|
|
|
a.warehouse_id, |
|
|
|
W.WareHouseName,--仓库名称 |
|
|
|
a.location_id, |
|
|
|
L.LocationName,--货位名称 |
|
|
|
a.first_in_date,--入库日期 |
|
|
|
a.manufacture_date,--生产日期 |
|
|
|
a.expired_date, --有效期 |
|
|
|
a.orderref0,--来源单据类型 |
|
|
|
a.orderref1,--来源单据号 |
|
|
|
a.orderref2,--来源单据行号 |
|
|
|
a.batch_no, --合约号码 |
|
|
|
a.wdr, --批次号 |
|
|
|
a.remark --备注说明 |
|
|
|
from inventory_stock a |
|
|
|
LEFT JOIN PART b ON a.site = b.Site AND a.part_no = b.PartNo |
|
|
|
LEFT JOIN UM ON b.Site = UM.Site AND b.UMID = UM.UMID |
|
|
|
LEFT JOIN WareHouse W ON a.site = W.Site AND a.warehouse_id = W.WareHouseID |
|
|
|
LEFT JOIN Location L ON a.site = L.Site AND a.location_id = L.LocationName |
|
|
|
<where> |
|
|
|
|
|
|
|
and a.status != '出库' |
|
|
|
|
|
|
|
<if test="query.site != null and query.site != ''"> |
|
|
|
and A.site=#{query.site,jdbcType=VARCHAR} |
|
|
|
</if> |
|
|
|
@ -160,4 +187,16 @@ |
|
|
|
</where> |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 更新库存标签属性 --> |
|
|
|
<update id="updateInventoryStockAttribute"> |
|
|
|
UPDATE inventory_stock |
|
|
|
SET |
|
|
|
batch_no = #{batchNo,jdbcType=VARCHAR}, |
|
|
|
remark = #{remark,jdbcType=VARCHAR} |
|
|
|
WHERE site = #{site,jdbcType=VARCHAR} |
|
|
|
AND bu_no = #{buNo,jdbcType=VARCHAR} |
|
|
|
AND roll_no = #{rollNo,jdbcType=VARCHAR} |
|
|
|
</update> |
|
|
|
|
|
|
|
</mapper> |