|
|
@@ -81,7 +81,8 @@ public class SendServiceImpl implements ISendService {
|
|
|
|
|
|
private void sendStock(InventoryTag tag, GClient client) {
|
|
|
try {
|
|
|
- remoteStockService.rfidCheck(tag);
|
|
|
+ boolean result = remoteStockService.rfidCheck(tag);
|
|
|
+ alarm(client, result);
|
|
|
} catch (Exception e) {
|
|
|
log.info("化学品服务异常:" + e.getMessage());
|
|
|
}
|
|
|
@@ -91,20 +92,24 @@ public class SendServiceImpl implements ISendService {
|
|
|
R<Boolean> result;
|
|
|
try {
|
|
|
result = bottleService.remoteAdd(tag);
|
|
|
- alarm(client, result);
|
|
|
+ if (result.getCode()==HttpStatus.SUCCESS){
|
|
|
+ alarm(client, result.getData());
|
|
|
+ }
|
|
|
} catch (Exception e) {
|
|
|
log.info("气瓶服务异常:" + e.getMessage());
|
|
|
}
|
|
|
try {
|
|
|
result = remoteBottleService.remoteAdd(tag);
|
|
|
- alarm(client, result);
|
|
|
+ if (result.getCode()==HttpStatus.SUCCESS){
|
|
|
+ alarm(client, result.getData());
|
|
|
+ }
|
|
|
} catch (Exception e) {
|
|
|
log.info("新气瓶服务异常:" + e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void alarm(GClient client, R<Boolean> result) {
|
|
|
- if (client != null && result.getCode() == HttpStatus.SUCCESS && Boolean.TRUE.equals(result.getData())) {
|
|
|
+ private void alarm(GClient client, Boolean result) {
|
|
|
+ if (client != null && Boolean.TRUE.equals(result)) {
|
|
|
DeJuRFIDServerImpl.alarm(client);
|
|
|
}
|
|
|
}
|