|
|
|
@ -8,6 +8,7 @@ import com.gaotao.modules.api.service.InterfaceCallLogService; |
|
|
|
import com.gaotao.modules.api.service.WmsMessageService; |
|
|
|
import com.gaotao.modules.automatedWarehouse.entity.PalletDetailData; |
|
|
|
import com.gaotao.modules.automatedWarehouse.entity.WmsTransportTask; |
|
|
|
import com.gaotao.modules.automatedWarehouse.entity.WmsTransportTaskDetail; |
|
|
|
import com.gaotao.modules.automatedWarehouse.mapper.WcsIntegrationMapper; |
|
|
|
import com.gaotao.modules.warehouse.entity.Pallet; |
|
|
|
import com.gaotao.modules.warehouse.service.PalletService; |
|
|
|
@ -74,7 +75,12 @@ public class AgvMessageServiceImpl implements AgvMessageService { |
|
|
|
if (!StringUtils.hasText(palletId)) { |
|
|
|
throw new RuntimeException("运输任务中未找到栈板信息"); |
|
|
|
} |
|
|
|
|
|
|
|
WmsTransportTask checkTask= wcsIntegrationMapper.getTransportTaskByTaskNo(inData.getTaskId()); |
|
|
|
if(checkTask==null){ |
|
|
|
throw new RuntimeException("运输任务不存在"); |
|
|
|
} |
|
|
|
String statusDesc=""; |
|
|
|
if(inData.getTargetPoint().equals(checkTask.getToLocation())){ |
|
|
|
// 5. 更新栈板calling_flag为N |
|
|
|
String username = "AGV_SYSTEM"; |
|
|
|
wcsIntegrationMapper.updatePalletCallingFlag(transportTask.getSite(), palletId, "N", username); |
|
|
|
@ -94,6 +100,18 @@ public class AgvMessageServiceImpl implements AgvMessageService { |
|
|
|
// 即使没有明细,也要更新栈板位置到目标站点 |
|
|
|
updatePalletLocationOnly(transportTask, username); |
|
|
|
} |
|
|
|
statusDesc="取货完成"; |
|
|
|
}else { |
|
|
|
statusDesc="送货完成"; |
|
|
|
} |
|
|
|
WmsTransportTaskDetail detail = new WmsTransportTaskDetail(); |
|
|
|
detail.setSite("55"); |
|
|
|
detail.setTaskNo(inData.getTaskId()); |
|
|
|
detail.setItemNo(1); |
|
|
|
detail.setSeqNo(wcsIntegrationMapper.getMaxSeqNoForTaskDetail("55",inData.getTaskId())); |
|
|
|
detail.setActionType(statusDesc); |
|
|
|
detail.setStatus("成功"); |
|
|
|
wcsIntegrationMapper.insertWmsTransportTaskDetail(detail); |
|
|
|
|
|
|
|
// 8. 更新接口日志为成功 |
|
|
|
if (logId != null) { |
|
|
|
|