Commit f71e82c6 zshaohui

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

1 个父辈 d16bb34f
...@@ -1242,28 +1242,31 @@ public class TaskService implements ITaskService { ...@@ -1242,28 +1242,31 @@ public class TaskService implements ITaskService {
} }
} }
if (task != null){ if (task != null){
log.info(task.getBarcode() + "已从库位[" + task.getPosName() + "]放到仓门口"); if (!task.isEnd() && !task.isFinished() ) {
//finishedTaskMap.remove(task.getBarcode());
//postOutNotification(dataCache.getSettings().getOutNotifyApi(), task.getBarcode(), task.getCid()); log.info(task.getBarcode() + "已从库位[" + task.getPosName() + "]放到仓门口");
if(dataCache.needConnectWeiChuang()){ //finishedTaskMap.remove(task.getBarcode());
String result = WebServiceClient.NotifyCarrierUnload(task.getBarcode(),task.getCid()); //postOutNotification(dataCache.getSettings().getOutNotifyApi(), task.getBarcode(), task.getCid());
if(!result.contains("success")){ if (dataCache.needConnectWeiChuang()) {
log.error("第一次发送["+task.getBarcode()+"]放到仓门口通知失败:" + result); String result = WebServiceClient.NotifyCarrierUnload(task.getBarcode(), task.getCid());
result = WebServiceClient.NotifyCarrierUnload(task.getBarcode(),task.getCid()); if (!result.contains("success")) {
if(!result.contains("success")){ log.error("第一次发送[" + task.getBarcode() + "]放到仓门口通知失败:" + result);
log.error("第二次发送["+task.getBarcode()+"]放到仓门口通知失败:" + result); result = WebServiceClient.NotifyCarrierUnload(task.getBarcode(), task.getCid());
result = WebServiceClient.NotifyCarrierUnload(task.getBarcode(),task.getCid()); if (!result.contains("success")) {
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);
}
} }
} }
} log.info(task.getBarcode() + "通知结果为:" + result);
log.info(task.getBarcode()+"通知结果为:"+result); if (result.contains("success")) {
if (result.contains("success")){ checkoutFinished(task);
checkoutFinished(task); task.setStatus(StorageConstants.OP_STATUS.END.name());
task.setStatus(StorageConstants.OP_STATUS.END.name()); dataLogDao.save(task);
dataLogDao.save(task); finishedTaskMap.put(task.getBarcode(), task);
finishedTaskMap.put(task.getBarcode(),task); }
} }
} }
} }
...@@ -1342,11 +1345,14 @@ public class TaskService implements ITaskService { ...@@ -1342,11 +1345,14 @@ public class TaskService implements ITaskService {
if(task.getPosId() == null) continue; if(task.getPosId() == null) continue;
if(task.isCheckOutTask()){ if(task.isCheckOutTask()){
if(task.getPosId().equals(pos.getId())){ if(task.getPosId().equals(pos.getId())){
log.info("库位【"+pos.getPosName()+"已在出库列表中,忽略】"); if (!task.isCancel()) {
return "库位【"+pos.getPosName()+"已在出库列表中,忽略】"; log.info("库位【" + pos.getPosName() + "已在出库列表中,忽略】");
return "库位【" + pos.getPosName() + "已在出库列表中,忽略】";
} else {
finishedTaskMap.remove(task.getId());
}
} }
} }
} }
if(dataCache.needConnectWeiChuang()){ if(dataCache.needConnectWeiChuang()){
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!