Commit d16bb34f zshaohui

发送11的时候,服务器进行出库

1 个父辈 46f4d67f
......@@ -1218,8 +1218,11 @@ public class TaskService implements ITaskService {
//暂不处理
} else if (StorageConstants.BOX_STATUS.OUT_FINISHED == status) {//出仓完成
log.info("物料出仓完成,暂不处理");
} else if (StorageConstants.BOX_STATUS.OUT_END == status) {//出库到门口,发送通知
//找到正在执行中的任务
DataLog task = findExecutingTask(statusBeanToSave.getCid(), boxStatus.getPosId());
if (task != null) {
if (task != null){
log.info(task.getBarcode() + "出仓位[" + task.getPosName() + "]完成");
DataLog cancelTask = findFinishedTask(statusBeanToSave.getCid(), boxStatus.getPosId());
if(cancelTask != null && cancelTask.isCancel()){
......@@ -1227,61 +1230,42 @@ public class TaskService implements ITaskService {
finishedTaskMap.remove(cancelTask.getBarcode());
log.info("从已完成的任务列表中删除之前取消的任务:"+cancelTask.getPosName() + " ReelId:" + cancelTask.getBarcode());
}
//dataCache.unLockOneReel(task.getCid(),task.getPartNumber());
checkoutFinished(task);
// if(dataCache.needConnectWeiChuang()){
// String result = WebServiceClient.NotifyCarrierUnload(task.getBarcode(),task.getCid());
// if(!result.contains("success")){
// log.error("第一次发送["+task.getBarcode()+"]放到仓门口通知失败:" + result);
// result = WebServiceClient.NotifyCarrierUnload(task.getBarcode(),task.getCid());
// if(!result.contains("success")){
// log.error("第二次发送["+task.getBarcode()+"]放到仓门口通知失败:" + result);
// result = WebServiceClient.NotifyCarrierUnload(task.getBarcode(),task.getCid());
// if(!result.contains("success")){
// log.error("第三次发送["+task.getBarcode()+"]放到仓门口通知失败:" + result);
// }
// }
// }
// }
}else{
//log.error(operationKey + "触发仓位完成时,操作队列中不存在");
} else {
//从已完成列表中找,如果还找不到就忽略
task = findFinishedTask(statusBeanToSave.getCid(), boxStatus.getPosId());
if (task != null) {
if(task.isCancel()){//被取消的任务,客户端发完成信号过来,修改取消状态为已完成
log.info(task.getBarcode() + "出仓位[" + task.getPosName() + "]完成,但任务已被取消,修改为完成");
checkoutFinished(task);
}
}else {
log.warn(statusBeanToSave.getCid() + "出仓位[" + boxStatus.getPosId() + "]完成时任务不存在");
}
}
} else if (StorageConstants.BOX_STATUS.OUT_END == status) {//出库到门口,发送通知
//暂不处理
DataLog task = findFinishedTask(statusBeanToSave.getCid(), boxStatus.getPosId());
if(storage != null && task !=null && !task.isCancel()){
if(!task.isEnd()){
task.setStatus(StorageConstants.OP_STATUS.END.name());
finishedTaskMap.put(task.getBarcode(),task);
log.info(task.getBarcode() + "已从库位[" + task.getPosName() + "]放到仓门口");
//finishedTaskMap.remove(task.getBarcode());
//postOutNotification(dataCache.getSettings().getOutNotifyApi(), task.getBarcode(), task.getCid());
if(dataCache.needConnectWeiChuang()){
String result = WebServiceClient.NotifyCarrierUnload(task.getBarcode(),task.getCid());
if (task != null){
log.info(task.getBarcode() + "已从库位[" + task.getPosName() + "]放到仓门口");
//finishedTaskMap.remove(task.getBarcode());
//postOutNotification(dataCache.getSettings().getOutNotifyApi(), task.getBarcode(), task.getCid());
if(dataCache.needConnectWeiChuang()){
String result = WebServiceClient.NotifyCarrierUnload(task.getBarcode(),task.getCid());
if(!result.contains("success")){
log.error("第一次发送["+task.getBarcode()+"]放到仓门口通知失败:" + result);
result = WebServiceClient.NotifyCarrierUnload(task.getBarcode(),task.getCid());
if(!result.contains("success")){
log.error("第次发送["+task.getBarcode()+"]放到仓门口通知失败:" + result);
log.error("第次发送["+task.getBarcode()+"]放到仓门口通知失败:" + result);
result = WebServiceClient.NotifyCarrierUnload(task.getBarcode(),task.getCid());
if(!result.contains("success")){
log.error("第二次发送["+task.getBarcode()+"]放到仓门口通知失败:" + result);
result = WebServiceClient.NotifyCarrierUnload(task.getBarcode(),task.getCid());
if(!result.contains("success")){
log.error("第三次发送["+task.getBarcode()+"]放到仓门口通知失败:" + result);
}
log.error("第三次发送["+task.getBarcode()+"]放到仓门口通知失败:" + result);
}
}
}
log.info(task.getBarcode()+"通知结果为:"+result);
if (result.contains("success")){
checkoutFinished(task);
task.setStatus(StorageConstants.OP_STATUS.END.name());
dataLogDao.save(task);
finishedTaskMap.put(task.getBarcode(),task);
}
}
}
}
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!