|
|
|
@ -4,11 +4,7 @@ import com.alibaba.fastjson2.JSONObject; |
|
|
|
import com.gaotao.modules.api.entity.*; |
|
|
|
import com.gaotao.modules.api.service.InterfaceCallLogService; |
|
|
|
import com.gaotao.modules.api.service.WmsMessageService; |
|
|
|
import com.gaotao.modules.automatedWarehouse.entity.AgvStation; |
|
|
|
import com.gaotao.modules.automatedWarehouse.entity.BufferZoneConfig; |
|
|
|
import com.gaotao.modules.automatedWarehouse.entity.PalletDetail; |
|
|
|
import com.gaotao.modules.automatedWarehouse.entity.WcsCallbackTask; |
|
|
|
import com.gaotao.modules.automatedWarehouse.entity.WmsOrderTask; |
|
|
|
import com.gaotao.modules.automatedWarehouse.entity.*; |
|
|
|
import com.gaotao.modules.automatedWarehouse.mapper.WcsIntegrationMapper; |
|
|
|
import com.gaotao.modules.automatedWarehouse.service.WcsIntegrationService; |
|
|
|
import com.gaotao.modules.other.entity.InventoryMoveRequestDto; |
|
|
|
@ -147,7 +143,7 @@ public class WmsMessageServiceImpl implements WmsMessageService { |
|
|
|
// 出库时从缓冲区配置获取 |
|
|
|
toWarehouseId = BufferZoneConfig.BUFFER_WAREHOUSE_ID.getValue(); |
|
|
|
toLocationId = BufferZoneConfig.BUFFER_LOCATION_ID.getValue(); |
|
|
|
|
|
|
|
inData.setToBarcode(BufferZoneConfig.BUFFER_Station_ID.getValue()); |
|
|
|
} else { |
|
|
|
throw new RuntimeException("不支持的事务类型:" + inData.getTransTypeDesc()); |
|
|
|
} |
|
|
|
@ -173,6 +169,13 @@ public class WmsMessageServiceImpl implements WmsMessageService { |
|
|
|
// 如果是入库,同时更新对应的wms_order_task状态 |
|
|
|
if ("入库".equals(inData.getTransTypeDesc())) { |
|
|
|
updateOrderTaskStatusForInboundCallback(inData); |
|
|
|
wcsIntegrationMapper.updatePalletCallingFlag(inData.getSite(), inData.getPalletId(), "Y", "SYS_WMS"); |
|
|
|
} |
|
|
|
// 如果是入库,同时更新对应的wms_order_task状态 |
|
|
|
if ("出库".equals(inData.getTransTypeDesc())) { |
|
|
|
updateOrderTaskStatusForOutCallback(inData); |
|
|
|
wcsIntegrationMapper.reUpdatePalletDetailWcsFlag(inData.getSite(),inData.getPalletId()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
log.info("WCS回调数据已保存:栈板={}, 任务类型={}, 目标位置={}-{}", |
|
|
|
@ -775,7 +778,19 @@ public class WmsMessageServiceImpl implements WmsMessageService { |
|
|
|
private void updateMessageStatus(String messageId, String status) { |
|
|
|
saveMessageStatus(messageId, status); |
|
|
|
} |
|
|
|
private void updateOrderTaskStatusForOutCallback(PalletWareHouseData inData) { |
|
|
|
if(inData.getTaskNo()!=null&&inData.getItemNo()!=null){ |
|
|
|
WmsOrderTask orderTask = wcsIntegrationMapper.findOrderTasksByTaskNoItem( |
|
|
|
inData.getSite(),inData.getTaskNo(),inData.getItemNo()); |
|
|
|
if(orderTask!=null){ |
|
|
|
wcsIntegrationMapper.updateOrderTaskStatusAndWmsStatus( |
|
|
|
orderTask.getId(), "进行中", "进行中" |
|
|
|
); |
|
|
|
wcsIntegrationMapper.updateOrderTaskDetailStatusByTaskNoPalletId(inData.getSite(),inData.getTaskNo(),"移出立库","移出立库",inData.getPalletId()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
/** |
|
|
|
* 收到入库回调时更新订单任务状态 |
|
|
|
* @param inData WCS回调数据 |
|
|
|
|