Browse Source

推送bug

master
常熟吴彦祖 3 months ago
parent
commit
6607f47391
  1. 2
      src/main/java/com/gaotao/modules/automatedWarehouse/mapper/WcsIntegrationMapper.java
  2. 28
      src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/WcsIntegrationServiceImpl.java
  3. 13
      src/main/resources/mapper/automatedWarehouse/WcsIntegrationMapper.xml

2
src/main/java/com/gaotao/modules/automatedWarehouse/mapper/WcsIntegrationMapper.java

@ -192,7 +192,7 @@ public interface WcsIntegrationMapper {
void reUpdatePalletDetailWcsFlag(@Param("site") String site, @Param("palletId") String palletId);
List<PalletDetailData> getPalletDetailsNewDetail(@Param("site") String site, @Param("palletId") String palletId);
void updateSOIssueNotifyOrderMaterialListDetailOutWcsFlag(@Param("site") String site, @Param("serialNo") String serialNo);
void insertWmsTransportTaskDetail(WmsTransportTaskDetail inData);
void insertWmsOrderTaskDetail(WmsOrderTaskDetail inData);

28
src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/WcsIntegrationServiceImpl.java

@ -291,7 +291,7 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService {
// 检查栈板是否正在被调用
String callingFlag = (String) palletInfo.get("calling_flag");
if ("Y".equals(callingFlag)) {
if ("Y".equals(callingFlag)&&!BufferZoneConfig.BUFFER_Station_ID.getValue().equals(palletInfo.get("locationCode"))) {
throw new RuntimeException("栈板正在被调用中,无法进行打托操作");
}
@ -352,10 +352,10 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService {
!StringUtils.hasText(position) || layer == null || !StringUtils.hasText(serialNo)) {
throw new Exception("参数不能为空");
}
Map<String, Object> palletData = wcsIntegrationMapper.getPalletInfo(site, palletId);
// 检查栈板是否正在被调用
String callingFlag = wcsIntegrationMapper.checkPalletCallingFlag(site, palletId);
if ("Y".equals(callingFlag)) {
if ("Y".equals(callingFlag)&&!BufferZoneConfig.BUFFER_Station_ID.getValue().equals(palletData.get("locationCode"))) {
throw new Exception("栈板正在被调用中,无法进行打托操作");
}
@ -451,10 +451,11 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService {
if (!StringUtils.hasText(site) || !StringUtils.hasText(palletId) || !StringUtils.hasText(serialNo)) {
throw new Exception("参数不能为空");
}
Map<String, Object> palletData = wcsIntegrationMapper.getPalletInfo(site, palletId);
// 检查栈板是否正在被调用
String callingFlag = wcsIntegrationMapper.checkPalletCallingFlag(site, palletId);
if ("Y".equals(callingFlag)) {
if ("Y".equals(callingFlag)&&!BufferZoneConfig.BUFFER_Station_ID.getValue().equals(palletData.get("locationCode"))) {
throw new Exception("栈板正在被调用中,无法进行扫出操作");
}
@ -536,10 +537,11 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService {
!StringUtils.hasText(serialNo) || !StringUtils.hasText(newPosition) || newLayer == null) {
throw new Exception("参数不能为空");
}
Map<String, Object> palletData = wcsIntegrationMapper.getPalletInfo(site, palletId);
// 检查栈板是否正在被调用
String callingFlag = wcsIntegrationMapper.checkPalletCallingFlag(site, palletId);
if ("Y".equals(callingFlag)) {
if ("Y".equals(callingFlag)&&!BufferZoneConfig.BUFFER_Station_ID.getValue().equals(palletData.get("locationCode"))) {
throw new Exception("栈板正在被调用中,无法进行位置调整");
}
@ -1281,10 +1283,20 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService {
throw new Exception("栈板不存在");
}
// 调用AGV接口创建任务
// List<String> targets = Arrays.asList(request.getStartStation());
// agvClientUtil.createTask(task.getTaskNo(), targets, null, task.getPriority());
// 根据序列号去修改最新的发货通知单
List<PalletDetailData> newDetail=wcsIntegrationMapper.getPalletDetailsNewDetail(site, palletId);
if(newDetail.isEmpty()){
return;
}
//判断是分拣目的栈板 不在立库缓冲区
if (!BufferZoneConfig.BUFFER_Station_ID.getValue().equals(palletInfo.get("locationCode"))) {
for (int i = 0; i < newDetail.size(); i++) {
wcsIntegrationMapper.updateSOIssueNotifyOrderMaterialListDetailOutWcsFlag(site, newDetail.get(i).getSerialNo());
}
}
//根据序列号去更新最新的
// 调用pushPalletDetailNew方法推送组托数据

13
src/main/resources/mapper/automatedWarehouse/WcsIntegrationMapper.xml

@ -450,6 +450,19 @@
where a.site=#{site} and a.pallet_id=#{palletId}
and a.wcs_flag = 1
</select>
<update id="updateSOIssueNotifyOrderMaterialListDetailOutWcsFlag">
WITH RankedRecords AS (
SELECT
out_wcs_flag,
ROW_NUMBER() OVER (ORDER BY notifyNo DESC) AS rn
FROM SOIssueNotifyOrderMaterialList_detail
WHERE site = #{site}
AND serialNo = #{serialNo}
)
UPDATE RankedRecords
SET out_wcs_flag = 'Y'
WHERE rn = 1;
</update>
<insert id="insertWmsTransportTaskDetail" >
insert into wms_transport_task_detail(
site,task_no,item_no,seq_no,action_type,[comment],from_location,to_location,agv_code,[status],start_time,

Loading…
Cancel
Save