Browse Source

分拣+领料单物料显示

master
常熟吴彦祖 3 weeks ago
parent
commit
5c08299440
  1. 6
      src/main/java/com/gaotao/modules/autoWareHourceHaian/service/impl/HaiAnPdaAutoWarehouseServiceImpl.java
  2. 50
      src/main/resources/mapper/autoWareHourceHaian/HaiAnNewIssureMapper.xml

6
src/main/java/com/gaotao/modules/autoWareHourceHaian/service/impl/HaiAnPdaAutoWarehouseServiceImpl.java

@ -1933,7 +1933,7 @@ public class HaiAnPdaAutoWarehouseServiceImpl implements HaiAnPdaAutoWarehouseSe
}
/**
* 人工分拣工作盘按数据库位置映射被分拣位并查询源盘码;有增量时缺盘或占位不唯一必须阻断WCS下发,无增量时返回空串。- rqrq
* 人工分拣工作盘按数据库位置映射被分拣位并查询源盘码;有增量时分别提示缺盘和多盘占位并阻断WCS下发,无增量时返回空串。- rqrq
* @param site 海安工厂,用于托盘查询隔离 - rqrq
* @param workStation 当前工作盘在数据库中的人工分拣位 - rqrq
* @param hasIncrement 本次是否存在wcs_flag=1的标签增量 - rqrq
@ -1948,6 +1948,10 @@ public class HaiAnPdaAutoWarehouseServiceImpl implements HaiAnPdaAutoWarehouseSe
return sourcePalletIds.get(0).trim();
}
if (hasIncrement) {
// 同一被分拣位查到多个有效托盘属于位置数据错误,单独提示并阻断本次增量下发;零盘仍沿用缺盘提示。- rqrq
if (sourcePalletIds != null && sourcePalletIds.size() > 1) {
throw new RuntimeException("数据错误,被分拣位同时有多个托盘存在!请联系管理员");
}
throw new RuntimeException("未找到被分拣托盘,请联系系统管理员");
}
return "";

50
src/main/resources/mapper/autoWareHourceHaian/HaiAnNewIssureMapper.xml

@ -216,29 +216,37 @@
<!-- 查询海安标签明细清单,返回subsite与追踪字段用于对账 - rqrq -->
<select id="haiAnSearchMaterialListDetail" resultType="HaiAnSOIssueNotifyOrderMaterialListDetailData">
SELECT
site,
notify_no AS notifyNo,
item_no AS itemNo,
BOM_item_no AS bomItemNo,
serialNo,
task_ref AS taskRef,
task_item AS taskItem,
task_seq AS taskSeq,
out_wcs_flag AS outWcsFlag,
out_wcs_time AS outWcsTime,
issure_flag AS issureFlag,
order_type AS orderType,
sub_site AS subSite,
batch_no AS batchNo,
alloc_seq AS allocSeq,
pallet_id AS palletId
FROM haian_SOIssueNotifyOrderMaterialList_detail
WHERE site = #{site}
AND notify_no = #{notifyNo}
d.site,
d.notify_no AS notifyNo,
d.item_no AS itemNo,
d.BOM_item_no AS bomItemNo,
d.serialNo AS serialNo,
d.task_ref AS taskRef,
d.task_item AS taskItem,
d.task_seq AS taskSeq,
d.out_wcs_flag AS outWcsFlag,
d.out_wcs_time AS outWcsTime,
d.issure_flag AS issureFlag,
d.order_type AS orderType,
d.sub_site AS subSite,
d.batch_no AS batchNo,
d.alloc_seq AS allocSeq,
d.pallet_id AS palletId,
m.component_part_no AS componentPartNo
FROM haian_SOIssueNotifyOrderMaterialList_detail d
<!-- 按site、单号、订单行、BOM行和子site取预定明细对应的物料编码;物料行缺失时保留标签明细。NOLOCK仅供展示,可能短暂脏读 - rqrq -->
LEFT JOIN haian_SOIssueNotifyOrderMaterialList m WITH (NOLOCK)
ON m.site = d.site
AND m.notify_no = d.notify_no
AND m.item_no = d.item_no
AND m.BOM_item_no = d.BOM_item_no
AND ISNULL(m.sub_site, '') = ISNULL(d.sub_site, '')
WHERE d.site = #{site}
AND d.notify_no = #{notifyNo}
<if test="subSite != null and subSite != ''">
AND sub_site = #{subSite}
AND d.sub_site = #{subSite}
</if>
ORDER BY item_no, BOM_item_no, alloc_seq, task_seq
ORDER BY d.item_no, d.BOM_item_no, d.alloc_seq, d.task_seq
</select>
<!-- rqrq - 海安齐套候选:从物料层关联订单层筛选transport_flag='N'。禁止NOLOCK:本查询后会回写transport_flag,脏读未提交明细会导致提前齐套 -->

Loading…
Cancel
Save