Browse Source

自动分拣

master
常熟吴彦祖 2 months ago
parent
commit
224cda1da8
  1. 10
      src/main/java/com/gaotao/modules/notify/mapper/NewIssureMapper.java
  2. 10
      src/main/java/com/gaotao/modules/notify/service/impl/NewIssureServiceImpl.java
  3. 8
      src/main/resources/mapper/notify/NewIssureMapper.xml

10
src/main/java/com/gaotao/modules/notify/mapper/NewIssureMapper.java

@ -148,4 +148,14 @@ public interface NewIssureMapper {
* 根据栈板ID和序列号列表查询栈板明细信息position, layer - rqrq * 根据栈板ID和序列号列表查询栈板明细信息position, layer - rqrq
*/ */
List<com.gaotao.modules.automatedWarehouse.entity.PalletDetail> getPalletDetailsByPalletAndSerials(@Param("site") String site, @Param("palletId") String palletId, @Param("serialNos") List<String> serialNos); List<com.gaotao.modules.automatedWarehouse.entity.PalletDetail> getPalletDetailsByPalletAndSerials(@Param("site") String site, @Param("palletId") String palletId, @Param("serialNos") List<String> serialNos);
/**
* @Description 查询序列号在handling_unit中的location_id无锁查询- rqrq
* @param site 工厂编码
* @param serialNo 序列号
* @return location_id
* @author rqrq
* @date 2025/10/30
*/
String getSerialNoLocationId(@Param("site") String site, @Param("serialNo") String serialNo);
} }

10
src/main/java/com/gaotao/modules/notify/service/impl/NewIssureServiceImpl.java

@ -907,6 +907,14 @@ public class NewIssureServiceImpl implements NewIssureService {
taskSeq=0; taskSeq=0;
} }
// 查询序列号的location_id如果不是AS区域则直接标记为已出库 - rqrq
String locationId = newIssureMapper.getSerialNoLocationId(site, serialNo);
String outWcsFlag = "N";
if (locationId != null && !locationId.equals("AS")) {
outWcsFlag = "Y";
System.out.println("序列号" + serialNo + "不在AS区域(location_id=" + locationId + "),直接标记为已出库 - rqrq");
}
com.gaotao.modules.notify.entity.SOIssueNotifyOrderMaterialListDetail detail = com.gaotao.modules.notify.entity.SOIssueNotifyOrderMaterialListDetail detail =
new com.gaotao.modules.notify.entity.SOIssueNotifyOrderMaterialListDetail(); new com.gaotao.modules.notify.entity.SOIssueNotifyOrderMaterialListDetail();
detail.setSite(site); detail.setSite(site);
@ -917,7 +925,7 @@ public class NewIssureServiceImpl implements NewIssureService {
detail.setTaskRef(taskNo); detail.setTaskRef(taskNo);
detail.setTaskItem(1); detail.setTaskItem(1);
detail.setTaskSeq(taskSeq); // 使用栈板对应的SeqNo - rqrq detail.setTaskSeq(taskSeq); // 使用栈板对应的SeqNo - rqrq
detail.setOutWcsFlag("N");
detail.setOutWcsFlag(outWcsFlag); // 根据location_id判断 - rqrq
detail.setIssureFlag("N"); detail.setIssureFlag("N");
detail.setOrderType("shoporder"); detail.setOrderType("shoporder");
detailList.add(detail); detailList.add(detail);

8
src/main/resources/mapper/notify/NewIssureMapper.xml

@ -291,4 +291,12 @@
ORDER BY position, layer ORDER BY position, layer
</select> </select>
<!-- rqrq - 查询序列号在handling_unit中的location_id(无锁查询)-->
<select id="getSerialNoLocationId" resultType="java.lang.String">
SELECT location_id
FROM handling_unit WITH (NOLOCK)
WHERE site = #{site}
AND unit_id = #{serialNo}
</select>
</mapper> </mapper>
Loading…
Cancel
Save