Commit 2a6b60e4 sunke

MES设备状态接口增加温湿度字段

1 个父辈 125494c3
...@@ -371,6 +371,8 @@ public class MesApiController extends BaseController { ...@@ -371,6 +371,8 @@ public class MesApiController extends BaseController {
storageList.add(storage); storageList.add(storage);
} }
String temperature = "";
String humidity = "";
List<Map<String,Object>> results = Lists.newArrayList(); List<Map<String,Object>> results = Lists.newArrayList();
for (Storage storage : storageList){ for (Storage storage : storageList){
StatusBean statusBean = taskService.getStatus(storage.getCid()); StatusBean statusBean = taskService.getStatus(storage.getCid());
...@@ -380,6 +382,8 @@ public class MesApiController extends BaseController { ...@@ -380,6 +382,8 @@ public class MesApiController extends BaseController {
BoxStatusBean boxStatusBean = boxStatusMap.get(1); BoxStatusBean boxStatusBean = boxStatusMap.get(1);
if(boxStatusBean != null){ if(boxStatusBean != null){
status = boxStatusBean.getStatus(); status = boxStatusBean.getStatus();
temperature = boxStatusBean.getTemperature();
humidity = boxStatusBean.getHumidity();
} }
} }
int storageStatus = status; int storageStatus = status;
...@@ -419,6 +423,8 @@ public class MesApiController extends BaseController { ...@@ -419,6 +423,8 @@ public class MesApiController extends BaseController {
} }
itemMap.put("emptySlot",emptySlotMap); itemMap.put("emptySlot",emptySlotMap);
itemMap.put("totalSlot",totalSlotMap); itemMap.put("totalSlot",totalSlotMap);
itemMap.put("temperature",temperature);
itemMap.put("humidity",humidity);
results.add(itemMap); results.add(itemMap);
} }
return results; return results;
......
...@@ -1681,7 +1681,14 @@ public class TaskService implements ITaskService { ...@@ -1681,7 +1681,14 @@ public class TaskService implements ITaskService {
dataCache.updateInventory(pos, barcode); dataCache.updateInventory(pos, barcode);
//dataCache.updateStorage(task.getCid()); //dataCache.updateStorage(task.getCid());
Storage storage = dataCache.getStorage(task.getCid());
if (storage != null) {
if (DataCache.isProductionFor(DataCache.CUSTOMER.PANACIM)) {
PanaApiController.checkInNotification(barcode);
} else {
postOutNotification(dataCache.getSettings().getOutNotifyApi(), task.getBarcode(), task.getCid());
}
}
} }
task.setOperator(opUser); task.setOperator(opUser);
...@@ -1917,7 +1924,7 @@ public class TaskService implements ITaskService { ...@@ -1917,7 +1924,7 @@ public class TaskService implements ITaskService {
//通知消息 //通知消息
Storage storage = dataCache.getStorage(task.getCid()); Storage storage = dataCache.getStorage(task.getCid());
if (storage != null) { if (storage != null) {
if (dataCache.isProductionFor(DataCache.CUSTOMER.PANACIM)) { if (DataCache.isProductionFor(DataCache.CUSTOMER.PANACIM)) {
PanaApiController.deliverNotification(barcode); PanaApiController.deliverNotification(barcode);
} else { } else {
postOutNotification(dataCache.getSettings().getOutNotifyApi(), task.getBarcode(), task.getCid()); postOutNotification(dataCache.getSettings().getOutNotifyApi(), task.getBarcode(), task.getCid());
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!